summaryrefslogtreecommitdiffstats
path: root/third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py')
-rw-r--r--third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py b/third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py
index 41a40fb..590e39e 100644
--- a/third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py
+++ b/third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_apitemp.py
@@ -79,11 +79,6 @@ class PrintGlOffsets(gl_XML.gl_print_base):
comma = ", "
- if f.return_type != 'void':
- dispatch = "RETURN_DISPATCH"
- else:
- dispatch = "DISPATCH"
-
need_proto = False
if not f.is_static_entry_point(name):
need_proto = True
@@ -97,12 +92,22 @@ class PrintGlOffsets(gl_XML.gl_print_base):
print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name))
print '{'
- if p_string == "":
- print ' %s(%s, (), (F, "gl%s();\\n"));' \
- % (dispatch, f.name, name)
+ if f.return_type != 'void':
+ dispatch = "RETURN_DISPATCH"
+ if p_string == "":
+ print ' %s(%s, %s, (), (F, "gl%s();\\n"));' \
+ % (dispatch, f.return_type, f.name, name)
+ else:
+ print ' %s(%s, %s, (%s), (F, "gl%s(%s);\\n", %s));' \
+ % (dispatch, f.return_type, f.name, p_string, name, t_string, o_string)
else:
- print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
- % (dispatch, f.name, p_string, name, t_string, o_string)
+ dispatch = "DISPATCH"
+ if p_string == "":
+ print ' %s(%s, (), (F, "gl%s();\\n"));' \
+ % (dispatch, f.name, name)
+ else:
+ print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
+ % (dispatch, f.name, p_string, name, t_string, o_string)
print '}'
print ''
return
@@ -120,7 +125,8 @@ class PrintGlOffsets(gl_XML.gl_print_base):
* NAME(n) - builds the final function name (usually add "gl" prefix)
* DISPATCH(func, args, msg) - code to do dispatch of named function.
* msg is a printf-style debug message.
- * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value
+ * RETURN_DISPATCH(type, func, args, msg) - code to do dispatch with a
+ * return value of type.
*
* Here is an example which generates the usual OpenGL functions:
* #define KEYWORD1