diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-04-04 23:24:32 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-04-05 16:44:22 +0100 |
commit | 0a676c559cdc006f2ecf935dbc925a94aa8a0052 (patch) | |
tree | c66126810727157ab8a3a8e790ecde2d8f41a6f4 /wrappers | |
parent | bfed7cefc1319c32476069e19573ef794657f5f9 (diff) |
gltrace,glretrace: Handle GL_ARB_query_buffer_object correctly.
More specifically, treat pointers as offsets when GL_QUERY_BUFFER is
bound to a buffer.
Code changes follow closely the similar logic used for PBOs.
https://github.com/apitrace/apitrace/issues/442
Diffstat (limited to 'wrappers')
-rw-r--r-- | wrappers/gltrace.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py index a89874f2..ae6f292f 100644 --- a/wrappers/gltrace.py +++ b/wrappers/gltrace.py @@ -943,6 +943,20 @@ class GlTracer(Tracer): print ' }' return + # Recognize offsets instead of pointers when query buffer is bound + if function.name.startswith('glGetQueryObject') and arg.output: + print r' gltrace::Context *_ctx = gltrace::getContext();' + print r' GLint _query_buffer = 0;' + print r' if (_ctx->features.query_buffer_object) {' + print r' _query_buffer = _glGetInteger(GL_QUERY_BUFFER_BINDING);' + print r' }' + print r' if (_query_buffer) {' + print r' trace::localWriter.writePointer((uintptr_t)%s);' % arg.name + print r' } else {' + Tracer.serializeArgValue(self, function, arg) + print r' }' + return + # Several GL state functions take GLenum symbolic names as # integer/floats; so dump the symbolic name whenever possible if function.name.startswith('gl') \ |