]> git.cworth.org Git - apitrace/log
apitrace
11 years agoImport libbacktrace, sans autotools build files
Alexander Monakov [Sat, 18 May 2013 09:50:15 +0000 (13:50 +0400)]
Import libbacktrace, sans autotools build files

11 years agoCleanup backtrace setup code
Alexander Monakov [Sun, 19 May 2013 08:10:40 +0000 (12:10 +0400)]
Cleanup backtrace setup code

Obtain the list of functions to backtrace from the environment on Android as
well.

11 years agoglretrace: Fix currentDrawable size book-keeping on WGL.
José Fonseca [Wed, 22 May 2013 15:24:04 +0000 (16:24 +0100)]
glretrace: Fix currentDrawable size book-keeping on WGL.

Width/height was being tampered by the window size adjustments.

11 years agosnapdiff: Avoid problems when there is a size mismatch.
José Fonseca [Wed, 22 May 2013 12:21:45 +0000 (13:21 +0100)]
snapdiff: Avoid problems when there is a size mismatch.

11 years agoglretrace: Never under-estimate the drawable dimensions (issue #127).
José Fonseca [Mon, 20 May 2013 16:53:36 +0000 (17:53 +0100)]
glretrace: Never under-estimate the drawable dimensions (issue #127).

Prevents flickering drawable sizes when they viewports alternate between
two partially overlaping rectangles.

11 years agod3dstate: Dump depth-stencil images.
José Fonseca [Mon, 20 May 2013 12:41:55 +0000 (13:41 +0100)]
d3dstate: Dump depth-stencil images.

Only the depth values are written so far.

11 years agod3dstate: Ensure COM is initialized before calling DirectXTex.
José Fonseca [Mon, 20 May 2013 12:35:23 +0000 (13:35 +0100)]
d3dstate: Ensure COM is initialized before calling DirectXTex.

As it often relies on WIC for conversion.

11 years agoglstate: Dump some of GL_ARB_vertex_attrib_binding params.
José Fonseca [Fri, 17 May 2013 08:35:53 +0000 (09:35 +0100)]
glstate: Dump some of GL_ARB_vertex_attrib_binding params.

11 years agoMerge branch 'backtrace'
José Fonseca [Mon, 13 May 2013 15:44:35 +0000 (16:44 +0100)]
Merge branch 'backtrace'

Conflicts:
common/trace_writer_local.cpp

11 years agocommon: Cleanup backtrace.
Alexander Monakov [Mon, 13 May 2013 14:35:44 +0000 (15:35 +0100)]
common: Cleanup backtrace.

There was a bool field that was caching results of 'is_backtrace_needed'
lookups.   Now that field is gone, and 'is_backtrace_needed' is called
repeatedly.  I guess it's not that bad (it boils down to a lookup in an
std::set), but that function was also printing notices for functions
with enabled stack trace recording, and now those messages are printed
repeatedly as well.  The following patch removes the notices completely
and slightly cleans up the surrounding code.

11 years agogui: Make "Details View" the default pane.
Alexander Monakov [Mon, 13 May 2013 14:33:54 +0000 (15:33 +0100)]
gui: Make "Details View" the default pane.

Instead of the "Backtrace".

11 years agoRe-add backtrace_is_needed() call.
José Fonseca [Mon, 13 May 2013 09:46:43 +0000 (10:46 +0100)]
Re-add backtrace_is_needed() call.

Removed by mistake during refactoring of commit
69909e3853c23d0ce062b6c9f232191970da9aee

11 years agoFix Android build.
Alexander Monakov [Mon, 13 May 2013 09:44:30 +0000 (10:44 +0100)]
Fix Android build.

11 years agoglstate: Create downsampled framebuffers for textures too.
José Fonseca [Fri, 10 May 2013 20:45:49 +0000 (21:45 +0100)]
glstate: Create downsampled framebuffers for textures too.

Not really tested yet, as ended up not being the problem I was trying to
fix.

11 years agoglstate: Bind the bound draw fbo for read before dumping.
José Fonseca [Fri, 10 May 2013 20:43:11 +0000 (21:43 +0100)]
glstate: Bind the bound draw fbo for read before dumping.

Otherwise we'll dump the currently bound read fbo.

11 years agoglstate: Fix typo in glBindRenderbuffer argument.
José Fonseca [Fri, 10 May 2013 20:53:52 +0000 (21:53 +0100)]
glstate: Fix typo in glBindRenderbuffer argument.

11 years agoglstate: Don't dump garbage when glReadPixels fail.
José Fonseca [Fri, 10 May 2013 20:44:07 +0000 (21:44 +0100)]
glstate: Don't dump garbage when glReadPixels fail.

11 years agoretrace: Join with runner threads before destroy runner objects.
José Fonseca [Fri, 10 May 2013 16:17:38 +0000 (17:17 +0100)]
retrace: Join with runner threads before destroy runner objects.

This fixes segfaults when exiting on windows.

11 years agoglxtrace: Fix glXBindTexImageEXT on NVIDIA.
José Fonseca [Fri, 10 May 2013 12:47:04 +0000 (13:47 +0100)]
glxtrace: Fix glXBindTexImageEXT on NVIDIA.

11 years agoMerge branch 'fork-safe' (issue #110)
José Fonseca [Fri, 10 May 2013 12:20:50 +0000 (13:20 +0100)]
Merge branch 'fork-safe' (issue #110)

11 years agoos: Prevent app from redirecting log messages.
José Fonseca [Fri, 10 May 2013 12:16:18 +0000 (13:16 +0100)]
os: Prevent app from redirecting log messages.

This happens e.g., with SurgeonSimulator2013

11 years agotrace: Check process id also when the destructor is invoked.
José Fonseca [Fri, 10 May 2013 11:27:26 +0000 (12:27 +0100)]
trace: Check process id also when the destructor is invoked.

11 years agoglretrace: Silence the warnings about unsupported GLX_EXT_texture_from_pixmap calls.
José Fonseca [Fri, 10 May 2013 09:25:42 +0000 (10:25 +0100)]
glretrace: Silence the warnings about unsupported GLX_EXT_texture_from_pixmap calls.

They should work reasonably from now on.

We should probably still warn for older traces, but it's quite obvious
anyway.

11 years agoglxtrace: Always use GL_RGBA for glXBindTexImageEXT.
José Fonseca [Fri, 10 May 2013 08:43:43 +0000 (09:43 +0100)]
glxtrace: Always use GL_RGBA for glXBindTexImageEXT.

11 years agoglxtrace: Prevent overflow in glXBindTexImageEXT fo.
José Fonseca [Fri, 10 May 2013 08:35:35 +0000 (09:35 +0100)]
glxtrace: Prevent overflow in glXBindTexImageEXT fo.

Stride needs to be 4bytes aligned.  We should probably use
GL_RGBA all the time, and avoid trouble here.

11 years agoglxtrace: Basic EXT_texture_from_pixmap support.
José Fonseca [Fri, 10 May 2013 07:28:15 +0000 (08:28 +0100)]
glxtrace: Basic EXT_texture_from_pixmap support.

Make EXT_texture_from_pixmap traces replayable, by emitting a fake
glTexImage2D calls on glXBindTexImageEXT calls.

11 years agoglxtrace: Cleanup the GLX enums.
José Fonseca [Fri, 10 May 2013 07:26:51 +0000 (08:26 +0100)]
glxtrace: Cleanup the GLX enums.

We don't need two sets of enums.

11 years agoTry to be robust against fork.
José Fonseca [Thu, 9 May 2013 17:32:37 +0000 (18:32 +0100)]
Try to be robust against fork.

11 years agoUse ndk-android-r7 for FirefoxOS builds.
Ben Kelly [Mon, 6 May 2013 17:25:15 +0000 (13:25 -0400)]
Use ndk-android-r7 for FirefoxOS builds.

Commit 7445733 added support for FirefoxOS, but appears to have been using
a newer version of the NDK than we typically build with.  The codeaurora.org
prebuilts repo we are tracking has not pulled in r8 yet and only provides r7.

For the time being it would be helpful to drop back to r7.  Admittedly, we
should probably have a better mechanism for selecting the latest version
available.

11 years agoUse ids for frames.
José Fonseca [Mon, 6 May 2013 06:25:40 +0000 (07:25 +0100)]
Use ids for frames.

So that we don't need to send the same frames over and over again.

11 years agoFix windows build.
José Fonseca [Sun, 5 May 2013 07:36:39 +0000 (08:36 +0100)]
Fix windows build.

11 years agoCleanup the backtrace representation.
José Fonseca [Sun, 5 May 2013 07:11:23 +0000 (08:11 +0100)]
Cleanup the backtrace representation.

Use strings and unsigned, instead of string values and unsigned values.

11 years agoRemove FunctionSig::backtrace member.
José Fonseca [Sat, 4 May 2013 10:10:33 +0000 (11:10 +0100)]
Remove FunctionSig::backtrace member.

Backtraces are really disjoint from signature.

This puts back const keyword in most FunctionSig usages.

11 years agoBacktrace via call detail
Eugene Velesevich [Tue, 23 Apr 2013 13:56:14 +0000 (17:56 +0400)]
Backtrace via call detail

Hello,

Changes from v3: Instead of writing the backtrace as Array, the backtrace is
now recorded as a list of stack frame nodes with optional stack frame details
(the scheme is below).

This patch implements backtrace recording during tracing, and adds support in
'apitrace dump' and QApitrace. Backtrace is obtained via platform-specific
functions (and, internally, in platform-specific format). Then it is parsed to
produce an std::vector of stack frame structs: { char *module, *function,
*filename, *linenumber, *offset } (some fields may be NULL) and is written
into the trace file in the Enter call section as a call detail:

BACKTRACE
    FRAME
        MODULE "module"
        FUNCTION "Foo"
        FILENAME "foo.cpp"
        LINENUMBER "1234"
        OFFSET "0xSDF"
    FRAME
        FUNCTION "Boo"
        // no filename line info available for this frame
END_BACKTRACE

A platform-dependent mechanism is provided to specify a set of traced
calls for which backtraces will be recorded. It is possible to specify
either function names, or prefixes of names by appending a '*' (e.g.
"glUniform*").

On Android the backtrace is retrieved from Dalvik via libdvm functions
imported at runtime.
Function set is specified in /data/apitrace.fnames, one per line.

On Linux the backtrace is retrieved via glibc backtrace(), and will not always
yield filename:linenumber information.
Function set is specified via APITRACE_BT_FUNCTIONS environment variable.

On other platforms, obtaining a backtrace is not implemented by this patch.

11 years agoImplement interposing of dlopen on Android
Alexander Monakov [Fri, 3 May 2013 17:03:27 +0000 (21:03 +0400)]
Implement interposing of dlopen on Android

Consolidate all implementations of unredirected dlopen in one place.

Use unredirected dlopen is glproc_egl.cpp as done in glproc_gl.cpp.

Check that tracing is enabled before redirecting dlopen.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
11 years agoDefine _GNU_SOURCE for the whole tree.
José Fonseca [Sat, 4 May 2013 08:33:41 +0000 (09:33 +0100)]
Define _GNU_SOURCE for the whole tree.

As not all dlfnc.h includes define it consistently.

11 years agoFix Android target build on Apple hosts.
Ben Kelly [Sat, 4 May 2013 04:35:37 +0000 (21:35 -0700)]
Fix Android target build on Apple hosts.

Currently CMakeLists.txt forces CMAKE_C_COMPILER to clang whenever
compiling on an APPLE host.  Unfortunately, this prevents the
android.toolchain.cmake script from selecting the correct cross
compiler. See [line 1136][].

To avoid this problem, only force clang if ANDROID_NDK is not set.  This
is one of the variables used by Android.mk.

[line 1136]: https://github.com/apitrace/apitrace/blob/master/cmake/toolchain/android.toolchain.cmake#L1136

11 years agod3d9trace: Fix D3DPT_TRIANGLEFAN vertex count computation.
José Fonseca [Fri, 3 May 2013 09:47:39 +0000 (10:47 +0100)]
d3d9trace: Fix D3DPT_TRIANGLEFAN vertex count computation.

11 years agoTag a new release 4.0.
José Fonseca [Thu, 2 May 2013 07:05:06 +0000 (08:05 +0100)]
Tag a new release 4.0.

Mostly for the benefit of those who prefer a tagged release instead of
master.

Anyway, it has been too long since the last one.  The output of
`git shortlog..HEAD` was impressive.  Thanks to all of them who
contributed.

11 years agoglstate: Fallback to GLX when there is no current EGL context (issue #124).
José Fonseca [Sun, 28 Apr 2013 21:32:27 +0000 (22:32 +0100)]
glstate: Fallback to GLX when there is no current EGL context (issue #124).

11 years agoconvert: Add a few notes.
José Fonseca [Fri, 26 Apr 2013 11:05:05 +0000 (12:05 +0100)]
convert: Add a few notes.

11 years agod3d9trace: Fix wrapping of IDirect3DSwapChain9Ex pointers.
José Fonseca [Thu, 25 Apr 2013 15:01:48 +0000 (16:01 +0100)]
d3d9trace: Fix wrapping of IDirect3DSwapChain9Ex pointers.

PIX will complain without this.

11 years agoscripts/convert: Allow converting from PIX.
José Fonseca [Thu, 25 Apr 2013 14:22:53 +0000 (15:22 +0100)]
scripts/convert: Allow converting from PIX.

11 years agogltrace: Handle even more formats in _gl_format_channels().
José Fonseca [Fri, 26 Apr 2013 08:59:36 +0000 (09:59 +0100)]
gltrace: Handle even more formats in _gl_format_channels().

The valid formats can be found by grepping 'Accepted by the <format> ' in
OpenGL extension specs.

These were all I could find.

11 years agogltrace: Recognize GL_*_INTEGER in _gl_format_channels (issue #123).
José Fonseca [Fri, 26 Apr 2013 07:36:13 +0000 (08:36 +0100)]
gltrace: Recognize GL_*_INTEGER in _gl_format_channels (issue #123).

11 years agoAdd option '--snapshot-format=' to allow write raw RGB directly to stdout
Shuang He [Wed, 24 Apr 2013 02:01:15 +0000 (10:01 +0800)]
Add option '--snapshot-format=' to allow write raw RGB directly to stdout

This allows to create h264 video with gstreamer-vaapi very fast, and save much more disk space.
Using PNM format couldn't reach same performance, since PNM decoding seems inefficient in gstreamer.
Following are some experiment data with smokinguns demo 1920x1080 resolution on Ivybridge:
1. With png saving, it runs at around 4.5 FPS, which has compression rate 5.15x against raw RGB data
   Reference command:
        glretrace -s snapshot/ smokinguns.trace

2. Using PNM with gstreamer-vaapi, which could run at around 9 FPS, which has compression rate
   485x (QP dependent) against raw RGB data.
   Reference command:
        glretrace -s - smokinguns.trace | gst-launch-0.10 fdsrc blocksize=409600 ! queue \
        ! pnmdec ! videoparse format=rgb width=1920 height=1080 ! ffmpegcolorspace ! queue \
! vaapiupload direct-rendering=0 ! queue ! vaapiencodeh264 ! filesink location=xxx.264

3. With following command that directly write raw RGB stream and encoded into H264 video, it
   runs at around 18.5 FPS, which has compression rate 485x (QP dependent) against raw RGB data,
   Reference command:
        glretrace --snapshot-format=RGB -s - smokinguns.trace | gst-launch-0.10 fdsrc blocksize=409600 ! queue \
! videoparse format=rgb width=1920 height=1080 ! queue ! ffmpegcolorspace ! queue \
! vaapiupload direct-rendering=0 ! queue ! vaapiencodeh264 ! filesink location=xxx.264

v2: Use --snapshot-format= option to specify which format is used to write to stdout output
v3: Use enum for snapshotFormat and add example in README.markdown

11 years agod3dretrace: Give more helpful messages for d3d debug layer failures.
José Fonseca [Tue, 23 Apr 2013 17:00:40 +0000 (18:00 +0100)]
d3dretrace: Give more helpful messages for d3d debug layer failures.

11 years agoos: Be more concise with the semantics of os::abort.
José Fonseca [Tue, 23 Apr 2013 16:56:08 +0000 (17:56 +0100)]
os: Be more concise with the semantics of os::abort.

11 years agoos: Bring back the compiler TLS check.
José Fonseca [Tue, 23 Apr 2013 09:12:12 +0000 (10:12 +0100)]
os: Bring back the compiler TLS check.

Seems better than fiddling with pre-defined macros.

11 years agoglretrace: Use OS_THREAD_SPECIFIC_PTR on glws_cocoa.mm
José Fonseca [Tue, 23 Apr 2013 08:55:23 +0000 (09:55 +0100)]
glretrace: Use OS_THREAD_SPECIFIC_PTR on glws_cocoa.mm

11 years agoos: Fallback to OS TLS when compiler does not support it (issue #120).
José Fonseca [Tue, 23 Apr 2013 08:46:26 +0000 (09:46 +0100)]
os: Fallback to OS TLS when compiler does not support it (issue #120).

11 years agoos: Simplify os::thread_specific_ptr.
José Fonseca [Tue, 23 Apr 2013 08:45:02 +0000 (09:45 +0100)]
os: Simplify os::thread_specific_ptr.

Instead of mimicking boost::thread_specific_ptr, do something that allows
to mimick more closely compiler TLS support.

11 years agoRevert "Remove os::thread_specific_ptr"
José Fonseca [Tue, 23 Apr 2013 08:42:48 +0000 (09:42 +0100)]
Revert "Remove os::thread_specific_ptr"

This reverts commit 67ec200baea241d55bea33c43fd5194d90d9e401.

11 years agoMove default argument to declaration.
José Fonseca [Tue, 23 Apr 2013 13:02:42 +0000 (14:02 +0100)]
Move default argument to declaration.

Fixes clang warning "addition of default argument on redeclaration makes
this constructor a default constructor".

11 years agoSet tabstops to 8
José Fonseca [Tue, 23 Apr 2013 07:26:42 +0000 (08:26 +0100)]
Set tabstops to 8

11 years agoAdd Android.mk to aid integration with FirefoxOS
Vasil Dimov [Mon, 22 Apr 2013 14:46:54 +0000 (17:46 +0300)]
Add Android.mk to aid integration with FirefoxOS

This Android.mk is part of "Bug 831147 - Integrate apitrace into build"
https://bugzilla.mozilla.org/831147 With this addition, when apitrace
sources are cloned into B2GROOT/external/apitrace, then the FirefoxOS
build system picks up automatically apitrace, compiles and installs it
to the right place.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
11 years agosnapdiff: Zoom in small images.
José Fonseca [Thu, 18 Apr 2013 19:30:49 +0000 (20:30 +0100)]
snapdiff: Zoom in small images.

Often used in tests.

11 years agoretracediff: Avoid WindowsError 5 Access is denied, when exiting.
José Fonseca [Thu, 18 Apr 2013 12:38:37 +0000 (13:38 +0100)]
retracediff: Avoid WindowsError 5 Access is denied, when exiting.

11 years agotracediff: Improve diff argument help message.
José Fonseca [Thu, 18 Apr 2013 12:38:09 +0000 (13:38 +0100)]
tracediff: Improve diff argument help message.

11 years agod3dretrace: Remove debug Sleep.
José Fonseca [Wed, 17 Apr 2013 12:47:08 +0000 (13:47 +0100)]
d3dretrace: Remove debug Sleep.

11 years agod3dretrace: Dump UINT formats too.
José Fonseca [Tue, 16 Apr 2013 18:38:00 +0000 (19:38 +0100)]
d3dretrace: Dump UINT formats too.

11 years agoGix MSVC build.
José Fonseca [Mon, 15 Apr 2013 09:19:09 +0000 (10:19 +0100)]
Gix MSVC build.

11 years agoglstate: Dump a few more parameters.
José Fonseca [Mon, 15 Apr 2013 08:23:49 +0000 (09:23 +0100)]
glstate: Dump a few more parameters.

11 years agogltrace,glretrace: Better support for indirect draws from user memory.
José Fonseca [Sun, 14 Apr 2013 14:40:01 +0000 (15:40 +0100)]
gltrace,glretrace: Better support for indirect draws from user memory.

Not really tested, though should be no worse than current situation.

11 years agogltrace: Better handling of GetPerfMonitorCounterInfoAMD
José Fonseca [Sun, 14 Apr 2013 13:45:04 +0000 (14:45 +0100)]
gltrace: Better handling of GetPerfMonitorCounterInfoAMD

11 years agogltrace: Respect all string length parameters.
José Fonseca [Sun, 14 Apr 2013 10:13:28 +0000 (11:13 +0100)]
gltrace: Respect all string length parameters.

11 years agogltrace: Handle negative lengths in glDebugMessageInsert* (issue 119).
José Fonseca [Sun, 14 Apr 2013 08:23:33 +0000 (09:23 +0100)]
gltrace: Handle negative lengths in glDebugMessageInsert* (issue 119).

11 years agogltrace,glretrace: A few more tweaks to (no) side-effects flags.
José Fonseca [Sat, 13 Apr 2013 07:40:23 +0000 (08:40 +0100)]
gltrace,glretrace: A few more tweaks to (no) side-effects flags.

11 years agotrim: Enable dependency analysis (--auto) by default.
Carl Worth [Thu, 21 Mar 2013 23:01:25 +0000 (16:01 -0700)]
trim: Enable dependency analysis (--auto) by default.

The --exact mode of trimming can be useful, but only if the user has
somehow performed all the dependency analysis needed manually, (such
as by extracting a list of calls from a previous run by
--print-callset). Since --exact inherently requires more care to be
used, it makes sense to also require an extra command-line option, and
to thus prefer the easier-to-use --auto mode by default.

11 years agotrim: Add --no-deps, --no-prune, and --exact options.
Carl Worth [Thu, 21 Mar 2013 22:49:58 +0000 (15:49 -0700)]
trim: Add --no-deps, --no-prune, and --exact options.

These allow for explicitly specifying the behavior desired. This
change anticipates some future change of the default trimming from
--exact to --auto. (That is, with these options in place, scripts can
be written today with either --exact or --auto and be immune to any
future change of the default.)

11 years agoFix sorting of callFlagTable
Carl Worth [Fri, 12 Apr 2013 21:23:00 +0000 (14:23 -0700)]
Fix sorting of callFlagTable

Commit 89681160639 inserted three entries in an unsorted position in
the list, tripping up an internal check and causing many apitrace
operations to abort. Fix this by restoring correct sorting.

11 years agotrim: Fix early-bailout bug when accepting both --calls and --frames
Carl Worth [Mon, 11 Mar 2013 22:49:17 +0000 (15:49 -0700)]
trim: Fix early-bailout bug when accepting both --calls and --frames

The trim code was inappropriately bailing once either list was
exhausted, before also exhausting the user's other requested list.

This fixes the traces/trim-frames-and-calls test recently added to the
apitrace-tests repository.

Thanks to Eric Anholt for reporting this bug.

11 years agotrim: Greatly expand the list of calls considered to have no side effects
Carl Worth [Fri, 15 Feb 2013 02:09:14 +0000 (18:09 -0800)]
trim: Greatly expand the list of calls considered to have no side effects

The list of calls added here with the NO_SIDE_EFFECTS flag was
obtained from the existing specs/glapi.py file, (most[*] calls with
"sideeffects=False").

It's a bit unfortunate that we have this duplication of information in
the source tree, (two different lists of calls with no side
effects). But that duplication was already present before this
commit. This commit merely brings this list into sync with the other.

[*] The following calls are not added here in spite of having
sideeffects=False in glapi.py:

    glGetTextureImageEXT
    glGetnCompressedTexImageARB
    glGetnColorTableARB

José reports that the above calls can have side effects when PBOs are
on, (and he plans to update glapi.py).

Then, while the following calls may not affect traditional "GL state"
they do have side effects that can be observed by the user. And these
are debugging side effects that can be very important when
replaying/analyzing a trace. For example, debug message or string
markers are used to decorate different portions of the graphics
command stream with user-supplied data that exists nowhere else. So
these calls are not considered as having no side effects:

    glDebugMessageControl
    glDebugMessageControlARB
    glDebugMessageEnableAMD
    glDebugMessageInsert
    glDebugMessageInsertAMD
    glDebugMessageInsertARB
    glPopDebugGroup
    glPushDebugGroup
    glStringMarkerGREMEDY

11 years agotrim: Don't consider a SwapBuffers call has having no side effects
Carl Worth [Sat, 16 Feb 2013 01:15:53 +0000 (17:15 -0800)]
trim: Don't consider a SwapBuffers call has having no side effects

I can't justify why I ever added this code. I can only guess that I was
trying to get qapitrace to not show frame markers for frames that had
largely been trimmed.

Anyway, the code is wrong. SwapBuffers call obviously have significant
side effects. And the effect I was trying to achieve is already well
satisified by the change in 2f0d1a3244c8953a4468759ac466b80c4965d38f
that will trim a SwapBuffers call when --trim-spec=drawing is in
force.

11 years agotrim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE
Carl Worth [Sat, 16 Feb 2013 00:31:11 +0000 (16:31 -0800)]
trim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE

The --prune option is documented precisely to prune calls with no side
effects, so that's the flag it should examine.

Previously, the trim --prune code was keying off of the VERBOSE
flag. This hasn't made a substantial difference in the past, (the
NO_SIDE_EFFECTS calls have historically all been VERBOSE as well). But
NO_SIDE_EFFECTS has the advantage that it can objectively determined,
so the set of calls that should have this flag should be
unambiguous. (Meanwhile, whether any particular call should be
classified as VERBOSE is inherently subjective.)

11 years agogltrace,glretrace: Properly handle PBOs with GL_EXT_direct_state_access.
José Fonseca [Fri, 12 Apr 2013 10:41:00 +0000 (11:41 +0100)]
gltrace,glretrace: Properly handle PBOs with GL_EXT_direct_state_access.

- glCompressed*Tex*ImageEXT receive intptr instead of blobs when PBO is used

- glGet*Tex*ImageEXT have side effects when PBO is used

11 years agoreplay: Add a --loop option to repeatedly loop over the final frame
Carl Worth [Thu, 21 Mar 2013 20:50:29 +0000 (13:50 -0700)]
replay: Add a --loop option to repeatedly loop over the final frame

This can be useful for repeatedly exercising the driver with the
operations of a single frame.

11 years agoglretrace: Flush outstanding requests when waiting for user input.
Carl Worth [Thu, 21 Mar 2013 22:52:19 +0000 (15:52 -0700)]
glretrace: Flush outstanding requests when waiting for user input.

This helps make "apitrace replay -sb" work in cases where the driver
really only exposes double-buffered rendering, (so a flush is required
to make anything appear if the trace doesn't include a final
SwapBuffers).

11 years agoCleanup README formatting.
José Fonseca [Fri, 12 Apr 2013 09:30:21 +0000 (10:30 +0100)]
Cleanup README formatting.

11 years agogui: Fix includes.
José Fonseca [Fri, 12 Apr 2013 09:27:31 +0000 (10:27 +0100)]
gui: Fix includes.

stdio.h doesn't seem necessary. stdlib.h might be though, for exit().

11 years agoqapitrace: Support executing glretrace on a remote target host.
Carl Worth [Thu, 9 Aug 2012 15:21:42 +0000 (08:21 -0700)]
qapitrace: Support executing glretrace on a remote target host.

This is supported with a new command-line argument:

qapitrace --remote-target <HOST> <trace-file>

See README.markdown for documentation on usage and current limitations
of this feature.

11 years agocmake: Update android.toolchain.cmake from upstream (issue #115).
José Fonseca [Fri, 12 Apr 2013 09:08:53 +0000 (10:08 +0100)]
cmake: Update android.toolchain.cmake from upstream (issue #115).

From https://github.com/taka-no-me/android-cmake/commit/62bcf2b40e8b8a943dd4923dfcf614e661af0678

11 years agoRename Android.markdown to Dalvik.markdown.
José Fonseca [Thu, 11 Apr 2013 21:49:35 +0000 (22:49 +0100)]
Rename Android.markdown to Dalvik.markdown.

As README still contains Android information.

Minor tweaks.

11 years agoImprove Android tracing instructions
Alexander Monakov [Fri, 5 Apr 2013 17:53:49 +0000 (21:53 +0400)]
Improve Android tracing instructions

Tracing of Java applications on Android is quite different from tracing native
executables, so move it to a separate file.

Add instructions on using wrapping support that appeared in Android 4.0, which
simplifies usage of apitrace on Android.

Add a reference to adjust-child-env tool that allows to inject tracing library
on Android without rebuilding and reflashing recovery image.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
11 years agogui: Handle calls stranded between frames gracefully (issue #117).
José Fonseca [Thu, 11 Apr 2013 17:54:06 +0000 (18:54 +0100)]
gui: Handle calls stranded between frames gracefully (issue #117).

Still a bit hackish (those calls will disappear), but at least the gui
doesn't crash now.

11 years agocli: Fix script search for out of source build.
José Fonseca [Wed, 10 Apr 2013 15:20:30 +0000 (16:20 +0100)]
cli: Fix script search for out of source build.

Only for debug builds.  Release must be installed.

11 years agogltrace: Handle negative lengths in glShaderSource* (issue #116).
José Fonseca [Mon, 8 Apr 2013 18:13:51 +0000 (19:13 +0100)]
gltrace: Handle negative lengths in glShaderSource* (issue #116).

11 years agoAdd per-directory synopsis.
José Fonseca [Wed, 27 Mar 2013 11:10:37 +0000 (11:10 +0000)]
Add per-directory synopsis.

11 years agoAdd a high-level overview of apitrace source tree.
José Fonseca [Wed, 27 Mar 2013 11:09:46 +0000 (11:09 +0000)]
Add a high-level overview of apitrace source tree.

11 years agocommon: Add more comments.
José Fonseca [Wed, 27 Mar 2013 10:16:03 +0000 (10:16 +0000)]
common: Add more comments.

11 years agocmake: Check for libproc library name
Laurent Carlier [Tue, 19 Mar 2013 19:46:57 +0000 (20:46 +0100)]
cmake: Check for libproc library name

libprocps can be replaced with libprocps-ng, so check for the proper library name.
This fix building with ArchLinux.

Reviewed-by: Arthur Huillet <arthur.huillet@free.fr>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
11 years agocommon: Set flags for D3D11.1 calls too.
José Fonseca [Tue, 12 Mar 2013 22:27:21 +0000 (22:27 +0000)]
common: Set flags for D3D11.1 calls too.

11 years agod3dretrace: Add state dumping support for ID3D11DeviceContext1
Jeff Muizelaar [Tue, 12 Mar 2013 20:31:17 +0000 (16:31 -0400)]
d3dretrace: Add state dumping support for ID3D11DeviceContext1

Signed-off-by: José Fonseca <jfonseca@vmware.com>
11 years agoglretrace: Fix cpu timings when not measuring gpu times.
José Fonseca [Mon, 11 Mar 2013 23:35:22 +0000 (23:35 +0000)]
glretrace: Fix cpu timings when not measuring gpu times.

11 years agoAdd some missing DXGI and D3D11.1 api
Jeff Muizelaar [Mon, 11 Mar 2013 19:56:30 +0000 (15:56 -0400)]
Add some missing DXGI and D3D11.1 api

Signed-off-by: José Fonseca <jfonseca@vmware.com>
11 years agodispatch: Compensate for broken GL headers in Visual Studio 2012
José Fonseca [Mon, 11 Mar 2013 22:37:29 +0000 (22:37 +0000)]
dispatch: Compensate for broken GL headers in Visual Studio 2012

11 years agocmake: Fix D2D include path w/ Visual Studio 2012.
José Fonseca [Mon, 11 Mar 2013 22:37:59 +0000 (22:37 +0000)]
cmake: Fix D2D include path w/ Visual Studio 2012.

11 years agogui: Link against pthread.
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

Signed-off-by: José Fonseca <jfonseca@vmware.com>
11 years agoglretrace: Fix several problems with the earlier commit.
José Fonseca [Wed, 6 Mar 2013 20:03:54 +0000 (20:03 +0000)]
glretrace: Fix several problems with the earlier commit.

11 years agoretrace: Add single thread option.
Jerome Glisse [Mon, 18 Feb 2013 17:22:11 +0000 (12:22 -0500)]
retrace: Add single thread option.

Allow to replay trace using only one thread, helpful when debugging
driver.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>