From: José Fonseca Date: Thu, 27 Oct 2011 13:35:07 +0000 (+0100) Subject: Retrace applications with mix ARB and core uniform calls correctly. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=7b6832419f5cade1990f29e6938ef0edd8a07d11;p=apitrace Retrace applications with mix ARB and core uniform calls correctly. A bit of an hack. --- diff --git a/specs/gltypes.py b/specs/gltypes.py index 1d9206b..829f0d8 100644 --- a/specs/gltypes.py +++ b/specs/gltypes.py @@ -74,8 +74,24 @@ GLquery = Handle("query", GLuint) GLfenceNV = Handle("fenceNV", GLuint) GLprogram = Handle("program", GLuint) GLshader = Handle("shader", GLuint) -GLlocation = Handle("location", GLint, key=('program', GLuint)) -GLlocationARB = Handle("locationARB", GLint, key=('programObj', GLhandleARB)) + +# Share the same mapping table for uniform locations of both core and +# GL_ARB_shader_objects programs. For a combination of reasons: +# +# - all OpenGL implementations appear to alias the names for both kind of +# programs; +# +# - most applications will use only one kind of shader programs; +# +# - some applications actually mix glUniformXxx calls with +# GL_ARB_shader_objects programs and glUniformXxxARB calls with core +# programs, and therefore, rely on a joint implementation. +# +# We use GLhandleARB as program key, since it is wider (void *) on MacOSX. +# +GLlocation = Handle("location", GLint, key=('program', GLhandleARB)) +GLlocationARB = Handle("location", GLint, key=('programObj', GLhandleARB)) + GLprogramARB = Handle("programARB", GLuint) GLframebuffer = Handle("framebuffer", GLuint) GLrenderbuffer = Handle("renderbuffer", GLuint)