diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
|---|---|---|
| committer | <> | 2014-05-08 15:03:54 +0000 |
| commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
| tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py | |
| parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
| download | VirtualBox-master.tar.gz | |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py')
| -rwxr-xr-x | src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py b/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py index e7b7e30c..bce38f18 100755 --- a/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py +++ b/src/VBox/GuestHost/OpenGL/glapi_parser/apiutil.py @@ -46,6 +46,7 @@ class APIFunction: self.paramset = [] self.props = [] self.chromium = [] + self.chrelopcode = -1 @@ -161,6 +162,9 @@ def ProcessSpecFile(filename, userFunc): record.params[i] = (name, type, vecSize) break + elif tokens[0] == 'chrelopcode': + record.chrelopcode = int(tokens[1]) + else: print 'Invalid token %s after function %s' % (tokens[0], record.name) #endif @@ -223,6 +227,17 @@ def GetAllFunctions(specFile = ""): funcs.sort() return funcs +def GetAllFunctionsAndOmittedAliases(specFile = ""): + """Return sorted list of all functions known to Chromium.""" + d = GetFunctionDict(specFile) + funcs = [] + for func in d.keys(): + rec = d[func] + if (not "omit" in rec.chromium or + rec.alias != ''): + funcs.append(func) + funcs.sort() + return funcs def GetDispatchedFunctions(specFile = ""): """Return sorted list of all functions handled by SPU dispatch table.""" @@ -300,6 +315,12 @@ def ChromiumProps(funcName): """Return list of Chromium-specific properties of the named GL function.""" d = GetFunctionDict() return d[funcName].chromium + +def ChromiumRelOpCode(funcName): + """Return list of Chromium-specific properties of the named GL function.""" + d = GetFunctionDict() + return d[funcName].chrelopcode + def ParamProps(funcName): """Return list of Parameter-specific properties of the named GL function.""" @@ -356,10 +377,10 @@ def GetCategoryWrapper(func_name): cat == "VBox"): return '' elif (cat == '1.3' or - cat == '1.4' or - cat == '1.5' or - cat == '2.0' or - cat == '2.1'): + cat == '1.4' or + cat == '1.5' or + cat == '2.0' or + cat == '2.1'): # i.e. OpenGL 1.3 or 1.4 or 1.5 return "OPENGL_VERSION_" + string.replace(cat, ".", "_") else: @@ -568,16 +589,16 @@ def MakeDeclarationString(params): #enddef def MakeDeclarationStringWithContext(ctx_macro_prefix, params): - """Same as MakeDeclarationString, but adds a context macro - """ - - n = len(params) - if n == 0: - return ctx_macro_prefix + '_ARGSINGLEDECL' - else: - result = MakeDeclarationString(params) - return ctx_macro_prefix + '_ARGDECL ' + result - #endif + """Same as MakeDeclarationString, but adds a context macro + """ + + n = len(params) + if n == 0: + return ctx_macro_prefix + '_ARGSINGLEDECL' + else: + result = MakeDeclarationString(params) + return ctx_macro_prefix + '_ARGDECL ' + result + #endif #enddef @@ -625,9 +646,9 @@ __lengths = { 'int': 4, 'GLintptrARB': 4, # XXX or 8 bytes? 'GLsizeiptrARB': 4, # XXX or 8 bytes? - 'GLhandleARB': 4, + 'VBoxGLhandleARB': 4, 'GLcharARB': 1, - 'uintptr_t': 4 + 'uintptr_t': 4 } def sizeof(type): |
