]> git.cworth.org Git - apitrace/commitdiff
Retrace applications with mix ARB and core uniform calls correctly.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 27 Oct 2011 13:35:07 +0000 (14:35 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 27 Oct 2011 13:35:07 +0000 (14:35 +0100)
A bit of an hack.

specs/gltypes.py

index 1d9206bd7244d5b13c5fec40ec58307ff71c87d4..829f0d84661caba35807633ee4fb259661fde6c3 100644 (file)
@@ -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)