diff options
author | Paul Berry <[email protected]> | 2012-10-30 08:45:29 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-11-01 11:22:49 -0700 |
commit | 571d5c353a6f801c7a6ce2dd323152e5a2dbf052 (patch) | |
tree | 68691f46eb6214ebf53fe8c3317a93978e0d2c32 /src/mapi/glapi/gen/gl_XML.py | |
parent | 33e000472080af2a48d9753847469789100fa613 (diff) |
dispatch: properly handle parameter name mismatches in glapitemp.h.
Previously, when code-generating aliased functions in glapitemp.h, we
weren't consistent about which function alias we used to obtain the
parameter names, with the risk that we would generate incorrect code
like this:
KEYWORD1 void KEYWORD2 NAME(Foo)(GLint x)
{
(void) x;
DISPATCH(Foo, (x), (F, "glFoo(%d);\n", x));
}
KEYWORD1 void KEYWORD2 NAME(FooEXT)(GLint y)
{
(void) x;
DISPATCH(Foo, (x), (F, "glFooEXT(%d);\n", x));
}
At the moment there are no aliased functions with mismatched parameter
names, so this isn't the problem. But when we introduce GLES1
functions into the dispatch table, there will be
(MapBufferRange/MapBufferRangeEXT). This patch paves the way for that
by fixing the code generation script to handle the mismatch correctly.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mapi/glapi/gen/gl_XML.py')
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index ef7ed519b5a..0196879127c 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -757,8 +757,11 @@ class gl_function( gl_item ): return self.images - def parameterIterator(self): - return self.parameters.__iter__(); + def parameterIterator(self, name = None): + if name is not None: + return self.entry_point_parameters[name].__iter__(); + else: + return self.parameters.__iter__(); def get_parameter_string(self, entrypoint = None): |