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 <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300>
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user