summaryrefslogtreecommitdiff
path: root/wrappers/gltrace.py
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-05-08 20:07:26 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-05-10 03:25:25 -0700
commitdd5b4b38a7d2bc3cf729d4f14d1a987869685077 (patch)
treecb3a808116115073c57c6b3dbe83b60b3c8ad5d1 /wrappers/gltrace.py
parent73a1a09bf7f6ea553cf1e9cbffac9211617a4997 (diff)
gltrace: Don't track GLES buffer contents.
Diffstat (limited to 'wrappers/gltrace.py')
-rw-r--r--wrappers/gltrace.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
index 38f1516a..2786ed48 100644
--- a/wrappers/gltrace.py
+++ b/wrappers/gltrace.py
@@ -143,8 +143,6 @@ class GlTracer(Tracer):
print '}'
print
- self.defineShadowBufferHelper()
-
# Whether we need user arrays
print 'static inline bool _need_user_arrays(void)'
print '{'
@@ -334,50 +332,6 @@ class GlTracer(Tracer):
else:
Tracer.traceApi(self, api)
- def defineShadowBufferHelper(self):
- print 'void _shadow_glGetBufferSubData(GLenum target, GLintptr offset,'
- print ' GLsizeiptr size, GLvoid *data)'
- print '{'
- print ' gltrace::Context *_ctx = gltrace::getContext();'
- print ' if (!_ctx->needsShadowBuffers() || target != GL_ELEMENT_ARRAY_BUFFER) {'
- print ' _glGetBufferSubData(target, offset, size, data);'
- print ' return;'
- print ' }'
- print
- print ' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);'
- print ' if (buffer_binding > 0) {'
- print ' gltrace::Buffer & buf = _ctx->buffers[buffer_binding];'
- print ' buf.getSubData(offset, size, data);'
- print ' }'
- print '}'
-
- def shadowBufferMethod(self, method):
- # Emit code to fetch the shadow buffer, and invoke a method
- print ' gltrace::Context *_ctx = gltrace::getContext();'
- print ' if (_ctx->needsShadowBuffers() && target == GL_ELEMENT_ARRAY_BUFFER) {'
- print ' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);'
- print ' if (buffer_binding > 0) {'
- print ' gltrace::Buffer & buf = _ctx->buffers[buffer_binding];'
- print ' buf.' + method + ';'
- print ' }'
- print ' }'
- print
-
- def shadowBufferProlog(self, function):
- if function.name == 'glBufferData':
- self.shadowBufferMethod('bufferData(size, data)')
-
- if function.name == 'glBufferSubData':
- self.shadowBufferMethod('bufferSubData(offset, size, data)')
-
- if function.name == 'glDeleteBuffers':
- print ' gltrace::Context *_ctx = gltrace::getContext();'
- print ' if (_ctx->needsShadowBuffers()) {'
- print ' for (GLsizei i = 0; i < n; i++) {'
- print ' _ctx->buffers.erase(buffer[i]);'
- print ' }'
- print ' }'
-
array_pointer_function_names = set((
"glVertexPointer",
"glNormalPointer",
@@ -617,7 +571,6 @@ class GlTracer(Tracer):
print ' }'
print ' if (flush && length > 0) {'
self.emit_memcpy('map', 'length')
- self.shadowBufferMethod('bufferSubData(offset, length, map)')
print ' }'
print ' }'
print ' }'
@@ -762,8 +715,6 @@ class GlTracer(Tracer):
print ' }'
print ' }'
- self.shadowBufferProlog(function)
-
Tracer.traceFunctionImplBody(self, function)
# These entrypoints are only expected to be implemented by tools;