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:
Adam Jackson
2022-12-12 10:59:44 -05:00
committed by Marge Bot
parent b090246ad2
commit fe1294e17a
4 changed files with 0 additions and 54 deletions

View File

@@ -2517,9 +2517,6 @@ _GLX_PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
f = (gl_function) get_glx_proc_address((const char *) procName); f = (gl_function) get_glx_proc_address((const char *) procName);
if ((f == NULL) && (procName[0] == 'g') && (procName[1] == 'l') if ((f == NULL) && (procName[0] == 'g') && (procName[1] == 'l')
&& (procName[2] != 'X')) { && (procName[2] != 'X')) {
#ifdef GLX_INDIRECT_RENDERING
f = (gl_function) __indirect_get_proc_address((const char *) procName);
#endif
if (!f) if (!f)
f = (gl_function) _glapi_get_proc_address((const char *) procName); f = (gl_function) _glapi_get_proc_address((const char *) procName);
#ifdef GLX_USE_APPLEGL #ifdef GLX_USE_APPLEGL

View File

@@ -192,7 +192,6 @@ static const struct extension_info known_gl_extensions[] = {
{ GL(EXT_texture_lod), N, N }, { GL(EXT_texture_lod), N, N },
{ GL(EXT_texture_lod_bias), N, N }, { GL(EXT_texture_lod_bias), N, N },
{ GL(EXT_texture_mirror_clamp), N, N }, { GL(EXT_texture_mirror_clamp), N, N },
{ GL(EXT_texture_object), N, N },
{ GL(EXT_texture_rectangle), N, N }, { GL(EXT_texture_rectangle), N, N },
{ GL(EXT_vertex_array), N, N }, { GL(EXT_vertex_array), N, N },
{ GL(3DFX_texture_compression_FXT1), N, N }, { GL(3DFX_texture_compression_FXT1), N, N },

View File

@@ -161,7 +161,6 @@ enum
GL_EXT_texture_lod_bit, GL_EXT_texture_lod_bit,
GL_EXT_texture_lod_bias_bit, GL_EXT_texture_lod_bias_bit,
GL_EXT_texture_mirror_clamp_bit, GL_EXT_texture_mirror_clamp_bit,
GL_EXT_texture_object_bit,
GL_EXT_vertex_array_bit, GL_EXT_vertex_array_bit,
GL_3DFX_texture_compression_FXT1_bit, GL_3DFX_texture_compression_FXT1_bit,
GL_APPLE_packed_pixels_bit, GL_APPLE_packed_pixels_bit,

View File

@@ -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: if func.glx_sop and func.glx_vendorpriv:
self.printFunction(func, func.glx_vendorpriv_names[0]) self.printFunction(func, func.glx_vendorpriv_names[0])
self.printGetProcAddress(api)
return 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): def printFunction(self, func, name):
footer = '}\n' footer = '}\n'
if func.glx_rop == ~0: if func.glx_rop == ~0: