hw/xwin/glx: When generating shims, limit the considered features to GL version <=1.2
This fixes a problem when using Khronos registry data since the change of 2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to GL_ARB_imaging. If shim generation considers all features, no shims are generated for glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore as shims are only generated for GL version <=1.2), then emission for GL_ARB_imaging is skipped as they have already been emitted. Also improve feature name matching so it is exact, not on an initial substring, so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc' aren't matched by 'GL_ARB_texture_compression'. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
3a51418b2d
commit
aa40d0c071
|
@ -100,13 +100,16 @@ reg = Registry()
|
|||
tree = etree.parse(regFilename)
|
||||
reg.loadElementTree(tree)
|
||||
|
||||
allVersions = '.*'
|
||||
if shim:
|
||||
versions = '1\.[012]'
|
||||
else:
|
||||
versions = '.*'
|
||||
|
||||
genOpts = CGeneratorOptions(
|
||||
apiname = prefix,
|
||||
profile = 'compatibility',
|
||||
versions = allVersions,
|
||||
emitversions = allVersions,
|
||||
versions = versions,
|
||||
emitversions = versions,
|
||||
defaultExtensions = prefix, # Default extensions for GL
|
||||
protectFile = protect,
|
||||
protectFeature = protect,
|
||||
|
@ -257,7 +260,7 @@ class ThunkOutputGenerator(OutputGenerator):
|
|||
pass
|
||||
def beginFeature(self, interface, emit):
|
||||
OutputGenerator.beginFeature(self, interface, emit)
|
||||
self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1')
|
||||
self.OldVersion = (self.featureName in ['GL_VERSION_1_0', 'GL_VERSION_1_1'])
|
||||
def endFeature(self):
|
||||
OutputGenerator.endFeature(self)
|
||||
def genType(self, typeinfo, name):
|
||||
|
@ -355,7 +358,7 @@ class ShimOutputGenerator(OutputGenerator):
|
|||
pass
|
||||
def beginFeature(self, interface, emit):
|
||||
OutputGenerator.beginFeature(self, interface, emit)
|
||||
self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1') or self.featureName.startswith('GL_VERSION_1_2') or self.featureName.startswith('GL_ARB_imaging') or self.featureName.startswith('GL_ARB_multitexture') or self.featureName.startswith('GL_ARB_texture_compression')
|
||||
self.OldVersion = (self.featureName in ['GL_VERSION_1_0', 'GL_VERSION_1_1', 'GL_VERSION_1_2', 'GL_ARB_imaging', 'GL_ARB_multitexture', 'GL_ARB_texture_compression'])
|
||||
def endFeature(self):
|
||||
OutputGenerator.endFeature(self)
|
||||
def genType(self, typeinfo, name):
|
||||
|
|
Loading…
Reference in New Issue
Block a user