diff options
author | Adam Jackson <[email protected]> | 2016-03-24 13:57:57 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2016-03-28 14:37:12 -0400 |
commit | c2f0bc2537b8e3d8a8dc4b8fb2e7c54b89cab60d (patch) | |
tree | 6a9e021553fcb07a48b062474f2f4fce7b24d46c /src | |
parent | ce3f0b23d1ee3e854780d01effb90a7c39134ffd (diff) |
glapi/glx: Thunk non-ABI calls through GetProcAddress
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_recv.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/glX_proto_recv.py b/src/mapi/glapi/gen/glX_proto_recv.py index 916da944689..1cfa8c5c142 100644 --- a/src/mapi/glapi/gen/glX_proto_recv.py +++ b/src/mapi/glapi/gen/glX_proto_recv.py @@ -117,6 +117,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): return + def fptrType(self, name): + fptr = "pfngl" + name + "proc" + return fptr.upper() def printFunction(self, f, name): if (f.glx_sop or f.glx_vendorpriv) and (len(f.get_images()) != 0): @@ -134,6 +137,9 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): print '{' + if not f.is_abi(): + print ' %s %s = __glGetProcAddress("gl%s");' % (self.fptrType(name), name, name) + if f.glx_rop or f.vectorequiv: self.printRenderFunction(f) elif f.glx_sop or f.glx_vendorpriv: @@ -218,6 +224,7 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): def emit_function_call(self, f, retval_assign, indent): list = [] + prefix = "gl" if f.is_abi() else "" for param in f.parameterIterator(): if param.is_padding: @@ -230,8 +237,7 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): list.append( '%s %s' % (indent, location) ) - - print '%s %sgl%s(%s);' % (indent, retval_assign, f.name, string.join(list, ',\n')) + print '%s %s%s%s(%s);' % (indent, retval_assign, prefix, f.name, string.join(list, ',\n')) def common_func_print_just_start(self, f, indent): |