示例#1
0
    if apiutil.FindSpecial("expando", func_name):
        allFunctions.append(func_name)
    elif apiutil.CanCompile(func_name) or apiutil.SetsClientState(func_name):
        generatedFunctions.append(func_name)
        allFunctions.append(func_name)

for func_name in generatedFunctions:
    params = apiutil.Parameters(func_name)
    return_type = apiutil.ReturnType(func_name)
    basicCallString = apiutil.MakeCallString(params)
    declarationString = apiutil.MakeDeclarationString(params)
    dlmCallString = basicCallString
    chromiumProps = apiutil.ChromiumProps(func_name)

    needClientState = 0
    if apiutil.UsesClientState(func_name):
        dlmCallString = basicCallString + ", clientState"
        needClientState = 1

    needDL = 0
    if apiutil.CanCompile(func_name):
        needDL = 1

    print 'static %s EXPANDOSPU_APIENTRY expando%s(%s)' % (
        return_type, func_name, declarationString)
    print '{'
    if needDL:
        print '\tGLenum dlMode = crDLMGetCurrentMode();'
    if needClientState:
        print '\tCRContext *stateContext = crStateGetCurrent();'
        print '\tCRClientState *clientState = NULL;'
示例#2
0
    packSuffix = ""
    basicCallString = apiutil.MakeCallString(params)
    packCallString = basicCallString
    dlmCallString = basicCallString

    needThreadDeclaration = 0
    needClientStateDeclaration = 0

    # Only the main source needs to handle display lists
    if apiutil.CanCompile(func_name):
        needDL = 1
        needThreadDeclaration = 1
    if apiutil.SetsTrackedState(func_name):
        needState = 1
        needPack = 0
    if apiutil.UsesClientState(func_name) and not apiutil.IsQuery(func_name):
        dlmCallString = basicCallString + ", clientState"
        needThreadDeclaration = 1
        needClientStateDeclaration = 1
        packCallString = packCallString + ", &(clientState->unpack)"
    if apiutil.FindSpecial("tilesort_bbox", func_name):
        packSuffix = "BBOX_COUNT"
    if "serverdependent" in chromiumProps:
        needThreadDeclaration = 1
        needWriteback = 1
        needState = 0
        needPack = 0
        if return_type != 'void':
            packCallString += ", &return_value"
        packCallString += ", &writeback"
    if apiutil.FindSpecial("tilesort_unimplemented", func_name):