From fe1294e17a43583eb434d4ba5785c038387fb6e3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 12 Dec 2022 10:59:44 -0500 Subject: glx: Remove the GetProcAddress special case for indirect rendering Some GL entrypoints would be aliased in an API sense but have different GLX protocol. The only one that matters to us is EXT_texture_object, which is the pre-GL-1.1 API. We're just going to drop support for that and assume you have 1.1 or better, since 1.0 + EXT_texture_object is a vanishingly rare combo at this point. Acked-by: David Heidelberg Part-of: --- src/mapi/glapi/gen/glX_proto_send.py | 49 ------------------------------------ 1 file changed, 49 deletions(-) (limited to 'src/mapi') diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index fb8a349ab48..1e01d5d9a2f 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py @@ -371,57 +371,8 @@ const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; if func.glx_sop and func.glx_vendorpriv: self.printFunction(func, func.glx_vendorpriv_names[0]) - self.printGetProcAddress(api) return - def printGetProcAddress(self, api): - procs = {} - for func in api.functionIterateGlx(): - for n in func.entry_points: - if func.has_different_protocol(n): - procs[n] = func.static_glx_name(n) - - print(""" -#ifdef GLX_INDIRECT_RENDERING - -static const struct proc_pair -{ - const char *name; - _glapi_proc proc; -} proc_pairs[%d] = {""" % len(procs)) - names = sorted(procs.keys()) - for i in range(len(names)): - comma = ',' if i < len(names) - 1 else '' - print(' { "%s", (_glapi_proc) gl%s }%s' % (names[i], procs[names[i]], comma)) - print("""}; - -static int -__indirect_get_proc_compare(const void *key, const void *memb) -{ - const struct proc_pair *pair = (const struct proc_pair *) memb; - return strcmp((const char *) key, pair->name); -} - -_glapi_proc -__indirect_get_proc_address(const char *name) -{ - const struct proc_pair *pair; - - /* skip "gl" */ - name += 2; - - pair = (const struct proc_pair *) bsearch((const void *) name, - (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]), - __indirect_get_proc_compare); - - return (pair) ? pair->proc : NULL; -} - -#endif /* GLX_INDIRECT_RENDERING */ -""") - return - - def printFunction(self, func, name): footer = '}\n' if func.glx_rop == ~0: -- cgit v1.2.3