From: José Fonseca Date: Thu, 26 May 2011 19:54:29 +0000 (+0100) Subject: Don't generate fake glBindAttribLocation for built-in attributes. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=2a794f5f10510b9519fd5072bbedd912bed6b9fe;p=apitrace Don't generate fake glBindAttribLocation for built-in attributes. --- diff --git a/gltrace.py b/gltrace.py index 47be12a..8114800 100644 --- a/gltrace.py +++ b/gltrace.py @@ -387,10 +387,12 @@ class GlTracer(Tracer): print ' GLchar name[256];' # TODO: Use ACTIVE_ATTRIBUTE_MAX_LENGTH instead of 256 print ' __glGetActiveAttrib(program, attrib, sizeof name, NULL, &size, &type, name);' - print ' GLint location = __glGetAttribLocation(program, name);' - print ' if (location >= 0) {' + print " if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {" + print ' GLint location = __glGetAttribLocation(program, name);' + print ' if (location >= 0) {' bind_function = glapi.glapi.get_function_by_name('glBindAttribLocation') self.fake_call(bind_function, ['program', 'location', 'name']) + print ' }' print ' }' print ' }' if function.name == 'glLinkProgramARB': @@ -403,10 +405,12 @@ class GlTracer(Tracer): print ' GLcharARB name[256];' # TODO: Use ACTIVE_ATTRIBUTE_MAX_LENGTH instead of 256 print ' __glGetActiveAttribARB(programObj, attrib, sizeof name, NULL, &size, &type, name);' - print ' GLint location = __glGetAttribLocationARB(programObj, name);' - print ' if (location >= 0) {' + print " if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {" + print ' GLint location = __glGetAttribLocationARB(programObj, name);' + print ' if (location >= 0) {' bind_function = glapi.glapi.get_function_by_name('glBindAttribLocationARB') self.fake_call(bind_function, ['programObj', 'location', 'name']) + print ' }' print ' }' print ' }'