Rob Clark [Mon, 11 Mar 2013 17:21:25 +0000 (13:21 -0400)]
gui: Link against pthread.
/usr/bin/ld: CMakeFiles/qapitrace.dir/apitracecall.cpp.o: undefined
reference to symbol '__pthread_key_create@@GLIBC_2.2.5'
/usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO
/lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
Carl Worth [Mon, 11 Feb 2013 21:49:02 +0000 (13:49 -0800)]
cli: Rename "apitrace retrace" to "apitrace replay".
After some debate on the mailing list, the consensus favors the name
"replay" for this operation. Update the documentation in
README.markdown to match.
Carl Worth [Tue, 28 Aug 2012 18:45:52 +0000 (11:45 -0700)]
replay: Support applications mixing glCreateProgramObjectARB and glUseProgram
As is known to happen with OpenGL, there are many more than one ways
to do the same thing. In this case, one can create a program
(glCreateProgram) or a program object (glCreateProgramObjectARB) along
with many similar pairs of functions.
In fact, a single application might even mix these two approaches,
(for example, calling glCreateProgramObjectARB and then calling
glUseProgram rather than glUseProgramObjectARB).
Historically, glretrace could fail with such mixed usage. The calls
into the ObjectARB function would go through _handleARB_map while the
other calls would go through _program_map, so after mixed calls the
desired object would not be found in the referenced map.
Making mixed usage work requires merging both _program_map and
_shader_map together with _handleARB map. This is correct for any
OpenGL implementation which supports the GL_ARB_shader_objects
extension, since there is no way to implement this extension correctly
without having shaders and programs in the same namespace.
However, we carefully maintain separate _shader_map and _program_map
for an OpenGL implementation not supporting GL_ARB_shader_objects. In
this case, it's not possible for an application to mix usage (since
none of the ObjectARB functions are guaranteed to exist). And it's
also possible for the implementation to provide separate namespaces
for shaders and programs, so they each need their own map.
Carl Worth [Fri, 16 Nov 2012 20:41:52 +0000 (12:41 -0800)]
trim: Trim swapbuffers calls when --trim-spec=drawing
Previously, the SwapBuffers calls were only getting trimmed if
--trim-spec included "no-side-effects". It was counter-intuitive that
a trim-spec of "drawing" alone would leave all the SwapBuffers calls
in place. So catch them under this trim-spec as well.
Carl Worth [Thu, 15 Nov 2012 04:55:31 +0000 (20:55 -0800)]
trim: Add a new --trim-spec option for fine-grained trimming
This has two benefits:
1. In cases where the dependency analysis goes wrong, using the --trim-spec
option can help identify which portion of the code is misbehaving, (and
allows the user to still get some trim benefit by avoiding the broken
code).
2. The implementation of this change breaks the analysis code up into several
more fine-grained functions, so it should be easier to review and maintain.
gui: Fix crash on trigger actions without loaded trace-file.
gui/apitrace: findFrameStart(), findFrameEnd(): Do nothing, when passed frame is null-pointer.
Add accelerator (F) to Edit->Find.
Add accelerator (N) and shortcut (Ctrl+N) to File->New.
Rename "File->New" to "File->New..." to indicate, that dialog will be showed.
Carl Worth [Thu, 15 Nov 2012 18:51:01 +0000 (10:51 -0800)]
glretrace: Use GL_TIMESTAMP (if available) for CPU profiling.
The prior scheme of trying to continuously re-synchronize separate CPU
and GPU counters is doomed to always be unreliable. Instead, simply prefer
to use the GL_TIMESTAMP values for both GPU and for CPU profiling.
Carl Worth [Sun, 12 Aug 2012 23:49:09 +0000 (16:49 -0700)]
glretrace, dump-images: Accept --call-nos=no to get snapshots with call numbers
It is sometimes inconvenient to have call numbers encoded within the
snapshot filenames. For example, when doing tests of "apitrace trim"
in the test suite the call numbers frequently change even when the
image contents do not.
By accepting the --call-nos=no option, these programs will now
generate filenames with sequential numbers starting from 0 rather than
using call numbers in the filenames.