[Piglit] [PATCH 1/3] registry: allow trailing text after name
Ilia Mirkin
imirkin at alum.mit.edu
Mon Aug 11 17:03:00 PDT 2014
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
registry/gl.py | 30 ++++--------------------------
1 file changed, 4 insertions(+), 26 deletions(-)
diff --git a/registry/gl.py b/registry/gl.py
index e8d6fd1..27823e2 100644
--- a/registry/gl.py
+++ b/registry/gl.py
@@ -76,8 +76,6 @@ def _repair_xml(xml_registry):
fixes = set((
'GL_ALL_ATTRIB_BITS',
'glOcclusionQueryEventMaskAMD',
- 'enums_SGI_0x8000_0x80BF',
- 'enums_ARB_0x80000_0x80BF',
'gles2_GL_ACTIVE_PROGRAM_EXT',
))
@@ -112,28 +110,6 @@ def _repair_xml(xml_registry):
fixes.remove('glOcclusionQueryEventMaskAMD')
continue
- if ('enums_SGI_0x8000_0x80BF' in fixes
- and enums.get('vendor') == 'SGI'
- and enums.get('start') == '0x8000'
- and enums.get('end') == '0x80BF'):
- # This element is empty garbage that overlaps an ARB enum group
- # with the same range.
- defer_removal(xml_registry, enums)
-
- fixes.remove('enums_SGI_0x8000_0x80BF')
- continue
-
- if ('enums_ARB_0x80000_0x80BF' in fixes
- and enums.get('vendor') == 'ARB'
- and enums.get('group', None) is None
- and enums.get('start', None) is None):
- # This tag lacks 'start' and 'end' attributes.
- enums.set('start', '0x8000')
- enums.set('end', '0x80BF')
-
- fixes.remove('enums_ARB_0x80000_0x80BF')
- continue
-
if ('gles2_GL_ACTIVE_PROGRAM_EXT' in fixes
and enums.get('vendor') == 'ARB'
and enums.get('start') <= '0x8259'
@@ -699,14 +675,16 @@ class CommandParam(object):
assert(xml_param.tag == 'param')
- self.name = xml_param.find('./name').text
+ name = self.name = xml_param.find('./name').text
# Rename the parameter if its name is a reserved keyword in MSVC.
self.name = self.__PARAM_NAME_FIXES.get(self.name, self.name)
# Pare the C type.
c_type_text = list(xml_param.itertext())
- c_type_text.pop(-1) # Pop off the text from the <name> subelement.
+ # Pop off all trailing text until you hit the name
+ while c_type_text.pop(-1) != name:
+ pass
c_type_text = (t.strip() for t in c_type_text)
self.c_type = ' '.join(c_type_text).strip()
--
1.8.5.5
More information about the Piglit
mailing list