mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
glapi: remove is_static_entry_point wrapper
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
This commit is contained in:
parent
20aadf4f64
commit
fb16a1121b
7 changed files with 16 additions and 15 deletions
|
|
@ -28,6 +28,7 @@ import argparse
|
|||
|
||||
import license
|
||||
import gl_XML, glX_XML
|
||||
import static_data
|
||||
|
||||
class PrintGenericStubs(gl_XML.gl_print_base):
|
||||
def __init__(self):
|
||||
|
|
@ -145,13 +146,13 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
|
||||
print('\tGL_STUB(gl%s, %d)' % (name, f.offset))
|
||||
|
||||
if not f.is_static_entry_point(f.name):
|
||||
if f.name not in static_data.libgl_public_functions:
|
||||
print('\tHIDDEN(gl%s)' % (name))
|
||||
|
||||
for f in api.functionIterateByOffset():
|
||||
name = f.dispatch_name()
|
||||
|
||||
if f.is_static_entry_point(f.name):
|
||||
if f.name in static_data.libgl_public_functions:
|
||||
for n in f.entry_points:
|
||||
if n != f.name:
|
||||
text = '\tGL_STUB_ALIAS(gl%s, gl%s)' % (n, f.name)
|
||||
|
|
|
|||
|
|
@ -746,9 +746,6 @@ class gl_function( gl_item ):
|
|||
|
||||
return p_string
|
||||
|
||||
def is_static_entry_point(self, name):
|
||||
return name in static_data.libgl_public_functions
|
||||
|
||||
def dispatch_name(self):
|
||||
if self.name in static_data.libgl_public_functions:
|
||||
return self.name
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
|
|||
t_string = ""
|
||||
comma = ""
|
||||
|
||||
if f.is_static_entry_point(name):
|
||||
if name in static_data.libgl_public_functions:
|
||||
keyword = "KEYWORD1"
|
||||
else:
|
||||
keyword = "KEYWORD1_ALT"
|
||||
|
|
@ -91,7 +91,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
|
|||
dispatch = "DISPATCH"
|
||||
|
||||
need_proto = False
|
||||
if not f.is_static_entry_point(name):
|
||||
if name not in static_data.libgl_public_functions:
|
||||
need_proto = True
|
||||
elif self.es:
|
||||
cat, num = api.get_category_for_name(name)
|
||||
|
|
@ -251,12 +251,12 @@ _glapi_proc UNUSED_TABLE_NAME[] = {""")
|
|||
# classify the entry points
|
||||
for name in func.entry_points:
|
||||
if func.has_different_protocol(name):
|
||||
if func.is_static_entry_point(name):
|
||||
if name in static_data.libgl_public_functions:
|
||||
proto_names.append(name)
|
||||
else:
|
||||
proto_stubs.append(name)
|
||||
else:
|
||||
if func.is_static_entry_point(name):
|
||||
if name in static_data.libgl_public_functions:
|
||||
normal_names.append(name)
|
||||
else:
|
||||
normal_stubs.append(name)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import argparse
|
|||
import license
|
||||
import gl_XML
|
||||
import glX_XML
|
||||
import static_data
|
||||
|
||||
|
||||
class PrintGlProcs(gl_XML.gl_print_base):
|
||||
|
|
@ -114,7 +115,8 @@ typedef struct {
|
|||
print('#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)')
|
||||
for func in api.functionIterateByOffset():
|
||||
for n in func.entry_points:
|
||||
if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)):
|
||||
if (func.name not in static_data.libgl_public_functions or
|
||||
(func.has_different_protocol(n) and n not in static_data.libgl_public_functions)):
|
||||
print('%s GLAPIENTRY gl_dispatch_stub_%u(%s);' % (func.return_type, func.offset, func.get_parameter_string()))
|
||||
break
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import copy
|
|||
|
||||
import license
|
||||
import gl_XML, glX_XML
|
||||
import static_data
|
||||
|
||||
def should_use_push(registers):
|
||||
for [reg, offset] in registers:
|
||||
|
|
@ -197,7 +198,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
print('\t.p2align\t4,,15')
|
||||
print('\t.globl\tGL_PREFIX(%s)' % (name))
|
||||
print('\t.type\tGL_PREFIX(%s), @function' % (name))
|
||||
if not f.is_static_entry_point(f.name):
|
||||
if f.name not in static_data.libgl_public_functions:
|
||||
print('\tHIDDEN(GL_PREFIX(%s))' % (name))
|
||||
print('GL_PREFIX(%s):' % (name))
|
||||
print('\tcall\t_x86_64_get_dispatch@PLT')
|
||||
|
|
@ -218,7 +219,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
dispatch = f.dispatch_name()
|
||||
for n in f.entry_points:
|
||||
if n != f.name:
|
||||
if f.is_static_entry_point(n):
|
||||
if n in static_data.libgl_public_functions:
|
||||
text = '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, dispatch)
|
||||
|
||||
if f.has_different_protocol(n):
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
|
||||
print('\tGL_STUB(%s, %d, %s)' % (name, f.offset, alt))
|
||||
|
||||
if not f.is_static_entry_point(f.name):
|
||||
if f.name not in static_data.libgl_public_functions:
|
||||
print('\tHIDDEN(GL_PREFIX(%s, %s))' % (name, alt))
|
||||
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
alt = "%s@%u" % (name, stack)
|
||||
|
||||
for n in f.entry_points:
|
||||
if f.is_static_entry_point(n):
|
||||
if n in static_data.libgl_public_functions:
|
||||
if n != f.name:
|
||||
alt2 = "%s@%u" % (n, stack)
|
||||
text = '\tGL_STUB_ALIAS(%s, %d, %s, %s, %s)' % (n, f.offset, alt2, name, alt)
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ def abi_parse_xml(xml):
|
|||
for name in entry_points:
|
||||
attrs = {
|
||||
'slot': func.offset,
|
||||
'hidden': not func.is_static_entry_point(name),
|
||||
'hidden': name not in static_data.libgl_public_functions,
|
||||
'alias': None if name == func.name else func.name,
|
||||
'handcode': bool(func.has_different_protocol(name)),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue