<div dir="ltr"><div>So apparently the first patch of this series ("Updated gl.xml to reflect new gl-4.5 features (namely arb_direct_state_access)") did not go through because it was too large. You can view this commit at <a href="http://cgit.freedesktop.org/~ldeks/piglit/commit/?h=master-xml&id=4d34005cfc600dc5974a41baf1bf209f8c517a06">http://cgit.freedesktop.org/~ldeks/piglit/commit/?h=master-xml&id=4d34005cfc600dc5974a41baf1bf209f8c517a06</a><br></div><div>in case you are curious. This is the unaltered new gl.xml from Khronos.<br><br>Laura<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 4, 2014 at 11:39 AM, Laura Ekstrand <span dir="ltr"><<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
registry/gl.py | 43 ++++++++++++++-----------------------------<br>
1 file changed, 14 insertions(+), 29 deletions(-)<br>
<br>
diff --git a/registry/gl.py b/registry/gl.py<br>
index e8d6fd1..17da57b 100644<br>
--- a/registry/gl.py<br>
+++ b/registry/gl.py<br>
@@ -76,8 +76,6 @@ def _repair_xml(xml_registry):<br>
fixes = set((<br>
'GL_ALL_ATTRIB_BITS',<br>
'glOcclusionQueryEventMaskAMD',<br>
- 'enums_SGI_0x8000_0x80BF',<br>
- 'enums_ARB_0x80000_0x80BF',<br>
'gles2_GL_ACTIVE_PROGRAM_EXT',<br>
))<br>
<br>
@@ -112,28 +110,6 @@ def _repair_xml(xml_registry):<br>
fixes.remove('glOcclusionQueryEventMaskAMD')<br>
continue<br>
<br>
- if ('enums_SGI_0x8000_0x80BF' in fixes<br>
- and enums.get('vendor') == 'SGI'<br>
- and enums.get('start') == '0x8000'<br>
- and enums.get('end') == '0x80BF'):<br>
- # This element is empty garbage that overlaps an ARB enum group<br>
- # with the same range.<br>
- defer_removal(xml_registry, enums)<br>
-<br>
- fixes.remove('enums_SGI_0x8000_0x80BF')<br>
- continue<br>
-<br>
- if ('enums_ARB_0x80000_0x80BF' in fixes<br>
- and enums.get('vendor') == 'ARB'<br>
- and enums.get('group', None) is None<br>
- and enums.get('start', None) is None):<br>
- # This tag lacks 'start' and 'end' attributes.<br>
- enums.set('start', '0x8000')<br>
- enums.set('end', '0x80BF')<br>
-<br>
- fixes.remove('enums_ARB_0x80000_0x80BF')<br>
- continue<br>
-<br>
if ('gles2_GL_ACTIVE_PROGRAM_EXT' in fixes<br>
and enums.get('vendor') == 'ARB'<br>
and enums.get('start') <= '0x8259'<br>
@@ -682,6 +658,7 @@ class CommandParam(object):<br>
Attributes:<br>
name<br>
c_type<br>
+ array_suffix<br>
"""<br>
<br>
__PARAM_NAME_FIXES = {'near': 'hither', 'far': 'yon'}<br>
@@ -696,6 +673,7 @@ class CommandParam(object):<br>
# <param len="bufSize"><ptype>GLint</ptype> *<name>values</name></param><br>
# <param><ptype>GLenum</ptype> <name>shadertype</name></param><br>
# <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param><br>
+ # <param><ptype>GLuint</ptype> <name>baseAndCount</name>[2]</param><br>
<br>
assert(xml_param.tag == 'param')<br>
<br>
@@ -704,9 +682,15 @@ class CommandParam(object):<br>
# Rename the parameter if its name is a reserved keyword in MSVC.<br>
<a href="http://self.name" target="_blank">self.name</a> = self.__PARAM_NAME_FIXES.get(<a href="http://self.name" target="_blank">self.name</a>, <a href="http://self.name" target="_blank">self.name</a>)<br>
<br>
- # Pare the C type.<br>
+ # Parse the C type.<br>
c_type_text = list(xml_param.itertext())<br>
- c_type_text.pop(-1) # Pop off the text from the <name> subelement.<br>
+ c_type_text_end = c_type_text.pop(-1) # Pop off the text from the <name> subelement.<br>
+ if c_type_text_end.startswith('['):<br>
+ # This is an array variable.<br>
+ self.array_suffix = c_type_text_end<br>
+ c_type_text.pop(-1) # Pop off the next one (<name>)<br>
+ else:<br>
+ self.array_suffix = ''<br>
c_type_text = (t.strip() for t in c_type_text)<br>
self.c_type = ' '.join(c_type_text).strip()<br>
<br>
@@ -714,7 +698,8 @@ class CommandParam(object):<br>
<br>
def __repr__(self):<br>
templ = ('{self.__class__.__name__}'<br>
- '(name={<a href="http://self.name" target="_blank">self.name</a>!r}, type={self.c_type!r})')<br>
+ '(name={<a href="http://self.name" target="_blank">self.name</a>!r}, type={self.c_type!r},'<br>
+ 'suffix={self.array_suffix!r})')<br>
return templ.format(self=self)<br>
<br>
<br>
@@ -828,7 +813,7 @@ class Command(object):<br>
def c_named_param_list(self):<br>
"""For example, "GLenum op, GLfloat value" for glAccum."""<br>
return ', '.join(<br>
- '{param.c_type} {<a href="http://param.name" target="_blank">param.name</a>}'.format(param=param)<br>
+ '{param.c_type} {<a href="http://param.name" target="_blank">param.name</a>}{param.array_suffix}'.format(param=param)<br>
for param in self.param_list<br>
)<br>
<br>
@@ -836,7 +821,7 @@ class Command(object):<br>
def c_unnamed_param_list(self):<br>
"""For example, "GLenum, GLfloat" for glAccum."""<br>
return ', '.join(<br>
- param.c_type<br>
+ '{param.c_type}{param.array_suffix}'.format(param=param)<br>
for param in self.param_list<br>
)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.1.0<br>
<br>
</font></span></blockquote></div><br></div>