]> git.cworth.org Git - apitrace/commitdiff
Skip glEnable/Disable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) (issue #83).
authorGregory Hainaut <gregory.hainaut@gmail.com>
Mon, 11 Jun 2012 12:58:22 +0000 (13:58 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 11 Jun 2012 13:00:05 +0000 (14:00 +0100)
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
retrace/glretrace.py

index 69a6dce6f7e20bc3ed606505d3b6b14892bcce0c..08fc6a054da8bb3bd43ffa7648f30030cb731c8b 100644 (file)
@@ -257,6 +257,11 @@ class GlRetracer(Retracer):
         if function.name == 'memcpy':
             print '    if (!dest || !src || !n) return;'
 
+        # Skip glEnable/Disable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) as we don't
+        # faithfully set the CONTEXT_DEBUG_BIT_ARB flags on context creation.
+        if function.name in ('glEnable', 'glDisable'):
+            print '    if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) return;'
+
         # Destroy the buffer mapping
         if function.name in self.unmap_function_names:
             print r'        GLvoid *ptr = NULL;'