mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glapi: use static_data.libgl_public_functions directly
also filter_entry_points is unused, so remove that Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
This commit is contained in:
parent
72db4a1e50
commit
20aadf4f64
4 changed files with 9 additions and 35 deletions
|
|
@ -27,6 +27,7 @@
|
|||
import gl_XML
|
||||
import license
|
||||
import sys, getopt, string
|
||||
import static_data
|
||||
|
||||
|
||||
class glx_item_factory(gl_XML.gl_item_factory):
|
||||
|
|
@ -522,7 +523,7 @@ class glx_function(gl_XML.gl_function):
|
|||
def static_glx_name(self, name):
|
||||
if self.has_different_protocol(name):
|
||||
for n in self.glx_vendorpriv_names:
|
||||
if n in self.static_entry_points:
|
||||
if n in static_data.libgl_public_functions:
|
||||
return n
|
||||
|
||||
return self.static_name(name)
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import argparse
|
|||
|
||||
import gl_XML, glX_XML, glX_proto_common, license
|
||||
import copy
|
||||
import static_data
|
||||
|
||||
def convertStringForXCB(str):
|
||||
tmp = ""
|
||||
|
|
@ -1041,7 +1042,7 @@ extern NOINLINE GLubyte * __glXSetupVendorRequest(
|
|||
for n in func.entry_points:
|
||||
if func.has_different_protocol(n):
|
||||
asdf = func.static_glx_name(n)
|
||||
if asdf not in func.static_entry_points:
|
||||
if asdf not in static_data.libgl_public_functions:
|
||||
print('extern %s gl%s(%s);' % (func.return_type, asdf, params))
|
||||
# give it a easy-to-remember name
|
||||
if func.client_handcode:
|
||||
|
|
|
|||
|
|
@ -588,8 +588,6 @@ class gl_function( gl_item ):
|
|||
# Decimal('1.1') }.
|
||||
self.api_map = {}
|
||||
|
||||
self.static_entry_points = []
|
||||
|
||||
# Track the parameter string (for the function prototype)
|
||||
# for each entry-point. This is done because some functions
|
||||
# change their prototype slightly when promoted from extension
|
||||
|
|
@ -619,9 +617,6 @@ class gl_function( gl_item ):
|
|||
assert not alias or not element.get('marshal_call_after')
|
||||
assert not alias or not element.get('deprecated')
|
||||
|
||||
if name in static_data.libgl_public_functions:
|
||||
self.static_entry_points.append(name)
|
||||
|
||||
self.entry_points.append( name )
|
||||
|
||||
for api in ('es1', 'es2'):
|
||||
|
|
@ -719,29 +714,6 @@ class gl_function( gl_item ):
|
|||
|
||||
return
|
||||
|
||||
def filter_entry_points(self, entry_point_list):
|
||||
"""Filter out entry points not in entry_point_list."""
|
||||
if not self.initialized:
|
||||
raise RuntimeError('%s is not initialized yet' % self.name)
|
||||
|
||||
entry_points = []
|
||||
for ent in self.entry_points:
|
||||
if ent not in entry_point_list:
|
||||
if ent in self.static_entry_points:
|
||||
self.static_entry_points.remove(ent)
|
||||
self.entry_point_parameters.pop(ent)
|
||||
else:
|
||||
entry_points.append(ent)
|
||||
|
||||
if not entry_points:
|
||||
raise RuntimeError('%s has no entry point after filtering' % self.name)
|
||||
|
||||
self.entry_points = entry_points
|
||||
if self.name not in entry_points:
|
||||
# use the first remaining entry point
|
||||
self.name = entry_points[0]
|
||||
self.parameters = self.entry_point_parameters[entry_points[0]]
|
||||
|
||||
def get_images(self):
|
||||
"""Return potentially empty list of input images."""
|
||||
return self.images
|
||||
|
|
@ -775,16 +747,16 @@ class gl_function( gl_item ):
|
|||
return p_string
|
||||
|
||||
def is_static_entry_point(self, name):
|
||||
return name in self.static_entry_points
|
||||
return name in static_data.libgl_public_functions
|
||||
|
||||
def dispatch_name(self):
|
||||
if self.name in self.static_entry_points:
|
||||
if self.name in static_data.libgl_public_functions:
|
||||
return self.name
|
||||
else:
|
||||
return "_dispatch_stub_%u" % (self.offset)
|
||||
|
||||
def static_name(self, name):
|
||||
if name in self.static_entry_points:
|
||||
if name in static_data.libgl_public_functions:
|
||||
return name
|
||||
else:
|
||||
return "_dispatch_stub_%u" % (self.offset)
|
||||
|
|
|
|||
|
|
@ -1679,7 +1679,7 @@ for name in all_functions:
|
|||
function_count = i
|
||||
|
||||
# Exported from libGL.so and libGLX_mesa.so (libEGL_mesa.so doesn't export any)
|
||||
libgl_public_functions = [
|
||||
libgl_public_functions = {
|
||||
"Accum",
|
||||
"ActiveShaderProgram",
|
||||
"ActiveTexture",
|
||||
|
|
@ -2983,4 +2983,4 @@ libgl_public_functions = [
|
|||
"WindowPos3sARB",
|
||||
"WindowPos3sv",
|
||||
"WindowPos3svARB",
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue