summaryrefslogtreecommitdiff
path: root/wrappers/gltrace.py
AgeCommit message (Collapse)AuthorFilesLines
2016-05-14glretrace: Cleanup fake function call emission.Jose Fonseca1-52/+41
Fixes https://github.com/apitrace/apitrace/issues/191
2016-05-13gltrace: Simplify EXT_compiled_vertex_arrays support.Jose Fonseca1-13/+10
2016-05-10gltrace: Drop support for user memory arrays with NV_vertex_program.Jose Fonseca1-102/+45
NV_vertex_program is vendor specific and deprecated. Drop support for it in order to reduce complexity and make way for better support for modern OpenGL. glVertexAttribPointerNV calls will still be traced, but the corresponding fake memcpy calls will not. Old traces still work fine. So if necessary an older build of apitrace can be used instead.
2016-05-10gltrace: Only check primitive restart index if supported.Jose Fonseca1-1/+1
2016-05-10gltrace: Pass draw parameters as struct.Jose Fonseca1-4/+23
2016-05-10gltrace: Avoid getting current context multiple times.Jose Fonseca1-13/+12
2016-05-10gltrace: Move vertex array count helpers to a different module.Jose Fonseca1-0/+1
2016-05-10gltrace: Don't track GLES buffer contents.Jose Fonseca1-49/+0
Basically revert d493737765bed0fcbba908024d2314778c26b5c9.
2016-04-10gltrace: Fix MAP_PERSISTENT_BIT warnings.Jose Fonseca1-8/+18
No need to warn about mappings without MAP_WRITE_BIT. Also shorten the URLs.
2016-04-05gltrace,glretrace: Handle GL_ARB_query_buffer_object correctly.Jose Fonseca1-0/+14
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
2016-04-04glretrace: Rename ctx to _ctx.Jose Fonseca1-30/+30
To avoid clash with function args.
2016-04-04gltrace: Use glfeature to decide when PBOs are supported.Jose Fonseca1-1/+1
2016-04-04helpers: rename glprofile to glfeatures.Jose Fonseca1-2/+2
This module will have more than just description of OpenGL profiles, but actual features.
2016-01-28wgltrace: Don't emit wglUseFontBitmapsA call.Jose Fonseca1-1/+15
Just emit a fake string marker for reference.
2015-11-23gltrace: Catch recursion in *GetProcAddres*Jose Fonseca1-0/+1
2015-07-21gltrace: Prevent buffer overflow when tracing ↵Jose Fonseca1-0/+2
glGetIntegerv(GL_PROGRAM_BINARY_FORMATS).
2015-06-27egltrace: Properly support KHR_debug on ES.Jose Fonseca1-0/+11
KHR_debug spec states that on OpenGL ES all entrypoints should have KHR suffixes.
2015-06-26gltrace: Fix tracing with OpenGL 1.1.Jose Fonseca1-8/+16
Some apps fully/partally use Microsoft OpenGL 1.1 GDI software renderer, which supports only one texture coordinate (no glClientActiveTexture).
2015-03-04gltrace: Disable ARB_get_program_binary.José Fonseca1-0/+19
In order to prevent issue #316.
2015-01-24gltrace: Support GL_EXT_map_buffer_range.Jose Fonseca1-16/+44
2015-01-21gltrace: Remove workaround for old Mesa drivers.José Fonseca1-48/+0
Long time has passed, so there should be very few affected drivers currently in use..
2015-01-20gltrace: Update BUGS.markdown link.José Fonseca1-1/+1
Thanks to Lawrence Love for spotting this.
2015-01-20gltrace: Warn about faking/moving gl*Pointer calls.José Fonseca1-0/+5
Fixes #259.
2015-01-08gltrace: Fix PBO unpacking on core contexts.José Fonseca1-5/+5
gltrace::PROFILE_COMPAT was a misnomer -- it actually meant desktop profile. So b0c597293060329afc1ee10d4062d30a2b272f78 broke PBO for core contexts.
2015-01-05gltrace: Use glprofile::Profile when tracing.José Fonseca1-11/+15
Less duplication, and hopefully more future proof.
2014-12-15gltrace: Implement VMWX_map_buffer_debugJosé Fonseca1-7/+28
2014-12-15gltrace: Warn about persisten/coherent mappings when actually mapping.José Fonseca1-7/+11
2014-11-13gltrace: Handle GL_INTEL_map_texture a bit better.José Fonseca1-0/+6
2014-11-12gltrace: Use a regex for unpack function names.José Fonseca1-70/+12
Less maintenance overhead, less chances of oversight.
2014-11-07gltrace: Fix false warnings about glArrayElement.José Fonseca1-1/+6
Only warn if glArrayElement is actually called.
2014-08-14gltrace: Use a regex for GL draw function names.José Fonseca1-34/+6
More future proof.
2014-08-14gltrace: Drop support for user arrays in gl*Draw*Indirect*.José Fonseca1-10/+13
Untested, complicated, and utterly pointless (though I believe not strictly forbidden) use of GL API.
2014-08-13specs: Support GL_ARB_direct_state_access.José Fonseca1-1/+25
2014-07-28gltrace/glretrace: Fake all debug functions.José Fonseca1-6/+8
And not just the glGet*. Fixes issue #281.
2014-07-17gltrace: Simplify _need_user_arrays.José Fonseca1-18/+12
2014-07-17gltrace: Don't bother distinguishing between glVertexAttribPointerARB and ↵José Fonseca1-22/+2
glVertexAttribPointer. These are aliases, and both part of OpenGL 2.0.
2014-06-25trace: Centralize fake memcpy emission.José Fonseca1-6/+6
2014-06-24gltrace: Emit flag calls consistently.José Fonseca1-4/+4
2014-06-18gltrace: Warn if user arrays are used with glBegin/glArrayElement/glEnd.José Fonseca1-0/+6
Issue #276.
2014-06-01gltrace: Warn about buggy glGet(GL_*ARRAY_SIZE) not returning GL_BGRA.José Fonseca1-0/+19
Issue #261.
2014-03-07gltrace: Handle GL_EXT_compiled_vertex_array correctly.José Fonseca1-0/+15
Quake3 puts some vertices in its array buffer that it never renders. This happens for clouds rendering as well as flares. (In other words, it creates a vertex buffer with V vertices, and an index buffer that reference indices substantially lower than V, max(I) < V). It uses compiled vertex arrays, and will LockArrays(V) - more elements than it actually references. This is legal because Quake3's arrays have a static size, much bigger than however many vertices it puts in there, so the driver can safely read the whole locked area even though half of it is never referenced. With Apitrace, however, the situation changes a bit, because Apitrace's calculation for the length of a user pointer is based on max(draw element indices). Below is an example of Quake3's sky rendering: 3466977 glLockArraysEXT(first = 0, count = 110) 3466978 glEnableClientState(array = GL_TEXTURE_COORD_ARRAY) 3466979 glEnableClientState(array = GL_COLOR_ARRAY) 3466980 glEnableClientState(array = GL_COLOR_ARRAY) 3466981 glBindTexture(target = GL_TEXTURE_2D, texture = 1132) 3466982 glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(440)) 3466983 glClientActiveTexture(texture = GL_TEXTURE1) 3466984 glTexCoordPointer(size = 2, type = GL_FLOAT, stride = 0, pointer = blob(440)) 3466985 glClientActiveTexture(texture = GL_TEXTURE0) 3466986 glColorPointer(size = 4, type = GL_UNSIGNED_BYTE, stride = 0, pointer = blob(220)) 3466987 glVertexPointer(size = 3, type = GL_FLOAT, stride = 16, pointer = blob(876)) 3466988 glDrawElements(mode = GL_TRIANGLES, count = 192, type = GL_UNSIGNED_INT, indices = blob(768)) The glDrawElements only references indices from 0 to 54. Under Apitrace, the trace only copies the 55 vertices, instead of the 110 locked values. When replaying, the driver, which may want to read the whole locked area, will read past the 55 vertices. This doesn't always crash because we're lucky, but on the NVIDIA driver this crashes fairly reliably. According to the compiled array spec, the driver is allowed to read all of the locked memory. The fix is to change the array tracing so that its count is based on max(drawelements_count, locked_count). Thanks to Arthur Huillet for diagnosing the problem, the above description, suggesting the fix, and testing it. Tested-by: Arthur Huillet <arthur.huillet@free.fr>
2014-03-07gltrace: Use _glGetInteger where possible.José Fonseca1-24/+12
Simplifies/condenses code somewhat.
2014-02-28gltrace: Warn about coherent/pinned memory mappings being unsupported.José Fonseca1-0/+11
See issue #232.
2014-02-04gltrace: Add a link to Mesa's glGetBufferParameteriv fix.José Fonseca1-1/+2
For reference.
2014-02-03gltrace: Ensure GL_ARRAY_BUFFER is unbound before emiting fake gl*Pointer() ↵José Fonseca1-0/+19
calls. When tracing, just before every drawcall, ApiTrace inserts gl*Pointer() calls into the stream on attributes it detected as resident in user-mem (instead of in a VBO). ApiTrace wasn't inserting a glBindBuffer(GL_ARRAY_BUFFER, 0) and glBindBuffer(GL_ARRAY_BUFFER, prevBuf) around those auto-generated calls. Thus, it misrepresented pointers as huge offsets into the currently bound VBO. Thanks to idinev for spotting and diagnosing this issue. This achieves the same result as idinev's fix in issue #222, but from the trace side.
2014-02-03glretrace: Add glCompressedTex*Image*ARB to unpack function name list.idinev1-0/+6
Issue #222.
2013-10-08trace: Protect against uninitialized pointers if debug extensions are not ↵Peter Lohrmann1-0/+9
exposed by the underlying driver and the user is attempting to query for a message log or object label. Sets the return parameters to NULL
2013-10-08trace: Additional support for GL_KHR_debug, GL_ARB_debug_output, and ↵Peter Lohrmann1-1/+41
GL_AMD_debug_output. * Mark some of the entrypoints as having sideeffects so that they will be replayed and can be seen in other 3rd party tools. * Add the three additional extensions to the supported extensions list. * Create new list of debug_entrypoints which may be implemented by a driver. These entrypoints need to be handled differently from the marker_entrypoints in that debug_entrypoints may be exposed by the driver via wglGetProcAddress and apitrace should pass the calls along if they are available. The marker_extensions are not expected to be implemented by the driver, so wglGetProcAddress(..) does not need to be called on them. Note that even though this causes apitrace to return the extension strings, the full extension implementation has not been completed, but the entrypoints are exposed for the application to call. Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-06-10gltrace: Expose marker functions when tracing is disabled.José Fonseca1-12/+23
Matches the output of change proposed by Peter Lohrmann in issue #138, but with slightly less new code. This is achieved by adding a new hook point, doInvokeFunction (could not think of a better name), used to generate the call to the real function, both when trace is enabled or disabled.
2013-05-29Fix defineShadowBufferHelper for buffer objectsMike Stroyan1-1/+1
Use GL_ELEMENT_ARRAY_BUFFER_BINDING instead of GL_ELEMENT_ARRAY_BUFFER to inquire the current buffer object in _shadow_glGetBufferSubData.