José Fonseca [Thu, 24 Nov 2011 16:30:49 +0000 (16:30 +0000)]
Prevent segfault on glretrace crash (fixes issue #52).
On glretrace crash, both error and finished QProcess events are emitted, by
this order. Members were reset on error, causing null pointer dereference
on replayFinished.
Fix this by handling abnormal termination on replayFinished too.
replayError should probably removed/merged into replayFinished.
Carl Worth [Mon, 14 Nov 2011 19:05:11 +0000 (11:05 -0800)]
snapdiff: Drop the --version option
This isn't currently giving any actual information, and it doesn't fit
well with the new top-level apitrace command, (which should presumably
take care of any --version option itself).
Chia-I Wu [Mon, 7 Nov 2011 23:12:29 +0000 (16:12 -0700)]
glws: Add support for profiles
The valid profiles are PROFILE_COMPAT, PROFILE_ES1, and PROFILE_ES2. They
stand for desktop GL with compatibility profile, GLESv1, and GLESv2
respectively. Update createContext to take profile as the last parameter.
Chia-I Wu [Wed, 2 Nov 2011 17:37:36 +0000 (01:37 +0800)]
gles: Add ES1 and ES2 profiles to glretrace.py
Some of the internal GL calls we make generate GL_INVALID_ENUM or other errors
when tracing an GLES app. We need to know the profile of the current context
to adapt the calls made.
Chia-I Wu [Wed, 2 Nov 2011 13:12:51 +0000 (21:12 +0800)]
gles: Include GLES headers in eglimports.hpp
They are always included to make sure we have GLES types and enums defined.
This allows us to treat GLES effectively as an extension to GL, without having
to put #ifdef's at multiple places.
Chia-I Wu [Wed, 2 Nov 2011 17:19:46 +0000 (01:19 +0800)]
Add tracer_context as the tracer's context
For now, it is just a static struct replacing __user_arrays*. Later, we can
add more fields to cache more GL states (e.g. is there a PBO bound?), support
multiple contexts, and etc.
Zack Rusin [Wed, 16 Nov 2011 02:33:31 +0000 (21:33 -0500)]
Fix fetching of the data for uniform arrays.
The initial array element is usually returned as arrayName[0] not
arrayName which means that we were usually creating two-dimensional
arrays for those elements which in turned always returned garbage.
Chia-I Wu [Wed, 2 Nov 2011 10:11:53 +0000 (18:11 +0800)]
egl: add EGL tracer
This tracer supports EGL/OpenGL applications for now. Support for GLES is
missing, but can be added later. There are two new macros defined. HAVE_EGL
indicates that the system has EGL available. It will make eglimports.h
include EGL headers.
There is also TRACE_EGL. It indicates that EGL, instead of the OS-dependent
GLX/CGL/WGL, is the winsys API to trace,
Chia-I Wu [Wed, 2 Nov 2011 10:47:23 +0000 (18:47 +0800)]
egl: Add eglimports.hpp
This header file is included by glimports.hpp. It is made a separate file
file so that we can add the (messy) GLES includes to it later without
complicating glimports.hpp.
Carl Worth [Fri, 4 Nov 2011 22:45:09 +0000 (15:45 -0700)]
cli: Add a new "apitrace diff" command.
This command simply provides a more consistent way of getting access
to the existing tracediff.sh command, (which is now installed to
<prefix>/lib/apitrace/scripts for the "apitrace diff" command to
invoke, but not necessarily for users to invoke directly).
Carl Worth [Wed, 2 Nov 2011 00:54:19 +0000 (17:54 -0700)]
Add a new "apitrace trace" command to the command-line interface.
There is no code to support Windows yet, but there is specific code
for both Linux and Mac OS X. The documentation is also updated to
reflect the new command.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
José Fonseca [Thu, 3 Nov 2011 11:54:05 +0000 (11:54 +0000)]
Put glxtrace.so also in the wrappers directory.
For consistency among all platforms, per Carl Worth's suggestion,
but the wrappers DLLs must remain in a directory of their own to
avoid interfering with other executables.
Carl Worth [Wed, 2 Nov 2011 00:31:28 +0000 (17:31 -0700)]
Mac OS X: Fix getProcessName() to avoid assertion failure in truncate
Apparently _NSGetExecutablePath doesn't actually set the len field in
the case of successfully copying a value to buf. In this case, the
value in buf is properly terminated, so we can just use strlen to find
a legal value to use when calling truncate.
Carl Worth [Thu, 20 Oct 2011 01:02:33 +0000 (18:02 -0700)]
Add a top-level apitrace program.
This is intended to eventually be a program which will provide access
to all apitrace functionality (tracing, trimming, replaying,
analyzing, launch the gui, etc.).
To start with it implements only the stub "apitrace help" command so
there's not any real functionality here yet.
José Fonseca [Sun, 30 Oct 2011 10:49:19 +0000 (10:49 +0000)]
Only jump to errors when the error item is activated.
Because currentItemChanged signal is too frequent/random, happening even
at times where errors window is invisible, when switching between tabs of
the current state pane, causing the current call to go out of focus.