summaryrefslogtreecommitdiff
path: root/src/mapi/glapi/gen/gl_genexec.py
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2015-05-06 12:39:09 -0700
committerVinson Lee <vlee@freedesktop.org>2015-05-06 23:26:21 -0700
commitcf5e015f71496e0626cd5c6262af1c5099391850 (patch)
tree6f52c35e729e8260b0a6323f9a221fe3d743dad0 /src/mapi/glapi/gen/gl_genexec.py
parent55b66dc4dee489e43b8e7a170fbc9ddd19a33aac (diff)
glapi: Add positional argument specifier.
Fix build error introduced with commit 1c5a57a "glapi/es3.1: Add support for GLES versions > 3.0" with Python < 2.7. File "src/mapi/glapi/gen/gl_genexec.py", line 230, in <module> printer.Print(api) File "src/mapi/glapi/gen/gl_XML.py", line 120, in Print self.printBody(api) File "src/mapi/glapi/gen/gl_genexec.py", line 187, in printBody condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {})'.format(int(f.api_map['es2'] * 10))) ValueError: zero length field name in format Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mapi/glapi/gen/gl_genexec.py')
-rw-r--r--src/mapi/glapi/gen/gl_genexec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_genexec.py b/src/mapi/glapi/gen/gl_genexec.py
index e58cdfc512..4e76fe3c2c 100644
--- a/src/mapi/glapi/gen/gl_genexec.py
+++ b/src/mapi/glapi/gen/gl_genexec.py
@@ -184,7 +184,7 @@ class PrintCode(gl_XML.gl_print_base):
condition_parts.append('ctx->API == API_OPENGLES')
if 'es2' in f.api_map:
if f.api_map['es2'] > 2.0:
- condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {})'.format(int(f.api_map['es2'] * 10)))
+ condition_parts.append('(ctx->API == API_OPENGLES2 && ctx->Version >= {0})'.format(int(f.api_map['es2'] * 10)))
else:
condition_parts.append('ctx->API == API_OPENGLES2')
if not condition_parts: