summaryrefslogtreecommitdiff
path: root/wrappers/gltrace.py
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2015-01-26 22:46:13 +0000
committerJosé Fonseca <jfonseca@vmware.com>2015-03-04 22:43:41 +0000
commite0c55fd7217451278a27b3df0d5f1c75784827c5 (patch)
tree216c832edd0838f2af19fee1aa9260b0ec02c36a /wrappers/gltrace.py
parentb5df658e06f01b9f4d2d47362fa584cdee07b0f6 (diff)
gltrace: Disable ARB_get_program_binary.
In order to prevent issue #316.
Diffstat (limited to 'wrappers/gltrace.py')
-rw-r--r--wrappers/gltrace.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
index 799894cd..5839c696 100644
--- a/wrappers/gltrace.py
+++ b/wrappers/gltrace.py
@@ -792,6 +792,13 @@ class GlTracer(Tracer):
# These functions have been dispatched already
return
+ # Force glProgramBinary to fail. Per ARB_get_program_binary this
+ # should signal the app that it needs to recompile.
+ if function.name in ('glProgramBinary', 'glProgramBinaryOES'):
+ print r' binaryFormat = 0xDEADDEAD;'
+ print r' binary = &binaryFormat;'
+ print r' length = sizeof binaryFormat;'
+
Tracer.invokeFunction(self, function)
def doInvokeFunction(self, function):
@@ -838,8 +845,20 @@ class GlTracer(Tracer):
print ' }'
return
+ if function.name in ('glGetProgramBinary', 'glGetProgramBinaryOES'):
+ print r' bufSize = 0;'
+
Tracer.doInvokeFunction(self, function)
+ if function.name == 'glGetProgramiv':
+ print r' if (params && pname == GL_PROGRAM_BINARY_LENGTH) {'
+ print r' *params = 0;'
+ print r' }'
+ if function.name in ('glGetProgramBinary', 'glGetProgramBinaryOES'):
+ print r' if (length) {'
+ print r' *length = 0;'
+ print r' }'
+
buffer_targets = [
'ARRAY_BUFFER',
'ELEMENT_ARRAY_BUFFER',