Chia-I Wu [Wed, 2 Nov 2011 17:32:35 +0000 (01:32 +0800)]
Add profile to tracer_context
The profile of the context, which is always PROFILE_COMPAT for now.
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.
Chia-I Wu [Wed, 2 Nov 2011 13:45:47 +0000 (21:45 +0800)]
Add GL_FIXED to __gl_type_size
It is needed for GL_ARB_ES2_compatibility (and GLES).
Zack Rusin [Thu, 17 Nov 2011 04:52:15 +0000 (23:52 -0500)]
Make the details view a bit clearer.
most importantly show the frame number
Zack Rusin [Thu, 17 Nov 2011 03:44:05 +0000 (22:44 -0500)]
Return format info for both textures and framebuffers.
Incredibly useful, especially that we don't encode anything
but 32bpp rgba correctly.
Zack Rusin [Thu, 17 Nov 2011 03:43:34 +0000 (22:43 -0500)]
Add depth info to the surfaces.
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.
José Fonseca [Fri, 11 Nov 2011 20:12:15 +0000 (20:12 +0000)]
Warn for QueryInterface with unknown IIDs.
José Fonseca [Fri, 11 Nov 2011 14:56:42 +0000 (14:56 +0000)]
Abstract execv().
José Fonseca [Wed, 9 Nov 2011 12:08:39 +0000 (12:08 +0000)]
Add missing terminator.
José Fonseca [Thu, 10 Nov 2011 06:37:13 +0000 (06:37 +0000)]
Add an "--api" option to "apitrace trace" allowing to choose egl.
José Fonseca [Thu, 10 Nov 2011 05:55:47 +0000 (05:55 +0000)]
Build egltrace.so into the wrapper dir.
Chia-I Wu [Wed, 2 Nov 2011 12:16:36 +0000 (20:16 +0800)]
egl: add retracing support for EGL
As the glws abstraction supports desktop GL, EGL retrace will abort with a
warning when the trace file tries to create a GLES context.
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,
José Fonseca [Sun, 6 Nov 2011 10:13:49 +0000 (10:13 +0000)]
cmake: include FindPkgConfig.
Chia-I Wu [Wed, 2 Nov 2011 10:30:28 +0000 (18:30 +0800)]
add support for (key, val) attribute list
A (key, val) attribute list has this format
{ key1, val1, ..., keyN, valN, terminator }
and the size is 2*N + 1
Chia-I Wu [Thu, 3 Nov 2011 04:24:53 +0000 (12:24 +0800)]
egl: Update glproc.py
Generate dispatch functions for EGL API.
Chia-I Wu [Thu, 3 Nov 2011 04:23:21 +0000 (12:23 +0800)]
egl: Add EGL API spec
Only those defined by EGL 1.4, no extensions yet. This limits the usefulness
a lot.
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.
Chia-I Wu [Wed, 2 Nov 2011 11:37:40 +0000 (19:37 +0800)]
egl: Add Khronos EGL headers
Use our own egl.h and eglext.h, but system's platform headers (eglplatform.h
and khrplatform.h).
Carl Worth [Sat, 5 Nov 2011 00:04:15 +0000 (17:04 -0700)]
Add new "apitrace diff-state" command
Which is simply a convenient way to invoke the existing jsondiff.py script,
(which is now installed by "make install" to support this command).
José Fonseca [Sun, 6 Nov 2011 09:01:12 +0000 (09:01 +0000)]
doc: Prefer `apitrace diff` over tracediff.sh.
José Fonseca [Sun, 6 Nov 2011 08:58:30 +0000 (08:58 +0000)]
cli: Pass apitrace path to tracediff.sh.
So that it works automatically from the build directory too.
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 [Fri, 4 Nov 2011 22:42:02 +0000 (15:42 -0700)]
Separate wrappers/ and scripts/ under <prefix>/lib/apitrace
We now define a new APITRACE_SCRIPTS_INSTALL_DIR:
<prefix>/lib/apitrace/scripts
where scripts will soon be installed (as needed).
Meanwhile, APITRACE_WRAPPER_INSTALL_DIR is updated to:
<prefix>/lib/apitrace/$arch/wrappers
(where before it didn't have the final "wrappers" directory).
Carl Worth [Fri, 4 Nov 2011 23:20:57 +0000 (16:20 -0700)]
Fix "apitrace trace" when running from installed location.
A missing path separator was causing the wrapper library to fail to be found.
José Fonseca [Sat, 5 Nov 2011 08:50:25 +0000 (08:50 +0000)]
gui: Handle incomplete calls.
Should fix issue 48.
José Fonseca [Thu, 3 Nov 2011 19:27:57 +0000 (19:27 +0000)]
Only re-allocate if the snappy cache buffer when it is not big enough.
José Fonseca [Thu, 3 Nov 2011 14:32:45 +0000 (14:32 +0000)]
Update glxtrace.so path in docs.
José Fonseca [Thu, 3 Nov 2011 14:24:01 +0000 (14:24 +0000)]
Fix typo.
José Fonseca [Thu, 3 Nov 2011 14:17:55 +0000 (14:17 +0000)]
Make findFile non-static, given it will be necessary for other commands.
José Fonseca [Thu, 3 Nov 2011 13:59:54 +0000 (13:59 +0000)]
Split common functionality out of cli.
José Fonseca [Thu, 3 Nov 2011 13:19:48 +0000 (13:19 +0000)]
Make file_exists as os::Path method.
José Fonseca [Thu, 3 Nov 2011 12:30:18 +0000 (12:30 +0000)]
Keep info on how to manually retrace in a separate section.
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 [Tue, 1 Nov 2011 20:47:26 +0000 (13:47 -0700)]
Give CLI command names a _command prefix
This is just to set things up for a trace_command command, (which
cannot be named "trace" since that would conflict with "namespace
trace").
Carl Worth [Tue, 1 Nov 2011 20:49:43 +0000 (13:49 -0700)]
Add os::Path.trimFilename function.
This is the counterpart to trimDirectory. This function trims the
final filename component from the path leaving just the containing
directory.
Carl Worth [Tue, 1 Nov 2011 21:26:38 +0000 (14:26 -0700)]
TODO: Add some notes on additions we want to the command-line interface
These come from some recent dicussion on the mailing list.
Carl Worth [Tue, 1 Nov 2011 20:48:55 +0000 (13:48 -0700)]
Minor typo correction of code comment
Without this, the sentence is not gramatically well-formed.
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.
José Fonseca [Tue, 1 Nov 2011 08:27:12 +0000 (08:27 +0000)]
Expose build/install dirs as a define.
Also, pick a wrapper install dir that varies with architecture, to allow
tracing of multiple binaries on multiarch.
José Fonseca [Tue, 1 Nov 2011 07:14:46 +0000 (07:14 +0000)]
Fix typos in _vscprintf comment.
Carl Worth [Tue, 18 Oct 2011 23:06:05 +0000 (16:06 -0700)]
Change non-executable install directories to include an "apitrace" component
It's just more polite to put documentation into
<prefix>/share/doc/apitrace rather than just dumping it into the
top-level <prefix>/doc.
Similarly, since glxtrace.so is not a conventional library, it doesn't
belong in <prefix>/lib but is well-suited for <prefix>/lib/apitrace.
José Fonseca [Mon, 31 Oct 2011 15:41:14 +0000 (15:41 +0000)]
Merge branch 'os-path'
José Fonseca [Mon, 31 Oct 2011 13:58:32 +0000 (13:58 +0000)]
More os::Path fixes.
José Fonseca [Mon, 31 Oct 2011 13:57:53 +0000 (13:57 +0000)]
Fix os::Path::format on MinwGW.
José Fonseca [Mon, 31 Oct 2011 11:52:10 +0000 (11:52 +0000)]
Include sys/syslimits.h for PATH_MAX on MacOSX.
José Fonseca [Sun, 30 Oct 2011 14:37:35 +0000 (14:37 +0000)]
Update docs / scripts for tracedump -> apitrace dump change.
José Fonseca [Sun, 30 Oct 2011 14:29:28 +0000 (14:29 +0000)]
Drop first_arg_command.
Unnecessary.
José Fonseca [Sun, 30 Oct 2011 14:21:03 +0000 (14:21 +0000)]
Better isolation of CLI source files.
José Fonseca [Sun, 30 Oct 2011 14:07:20 +0000 (14:07 +0000)]
Tweak help output.
* accept "apitrace dump --help" as help.
* list commands in "apitrace help" too.
* tweak whitespace.
José Fonseca [Sun, 30 Oct 2011 13:38:25 +0000 (13:38 +0000)]
Use a slightly different naming convention for cli source files.
José Fonseca [Sun, 30 Oct 2011 13:35:33 +0000 (13:35 +0000)]
Cleanup headers.
Eliminate unused & unix specific headers.
Carl Worth [Sat, 22 Oct 2011 03:40:56 +0000 (20:40 -0700)]
apitrace: Replace tracedump program with new "apitrace dump" command
The code just copies right over so should work exactly as before, but
with our nice, new, unified command-line syntax.
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 12:59:40 +0000 (12:59 +0000)]
Move os::Path to a separate header.
Much less re-compiles.
Also eliminate wide-spread use of PATH_MAX.
José Fonseca [Sun, 30 Oct 2011 10:51:53 +0000 (10:51 +0000)]
Have selected call always match the current call.
The current call (highlighted with single-click or keyboard navigation)
was serving no purpose, and this make navigation much more effective.
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.
José Fonseca [Sun, 30 Oct 2011 00:14:29 +0000 (01:14 +0100)]
Many fixes to os::Path.
José Fonseca [Fri, 28 Oct 2011 07:39:06 +0000 (08:39 +0100)]
Add a path manipulating class.
José Fonseca [Thu, 27 Oct 2011 23:15:09 +0000 (00:15 +0100)]
More tweaks/cleanups to D3D9 spec.
José Fonseca [Thu, 27 Oct 2011 17:14:45 +0000 (18:14 +0100)]
Minor tweaks to d3d9 spec.
Some state is a mixture of enum/flags
José Fonseca [Thu, 27 Oct 2011 13:43:10 +0000 (14:43 +0100)]
Define GLhandleARB as unsigned long on MacOSX.
José Fonseca [Thu, 27 Oct 2011 13:35:07 +0000 (14:35 +0100)]
Retrace applications with mix ARB and core uniform calls correctly.
A bit of an hack.
José Fonseca [Thu, 27 Oct 2011 12:23:17 +0000 (13:23 +0100)]
Fix buffer overflow when manipulating extensions string.
José Fonseca [Thu, 27 Oct 2011 07:10:56 +0000 (08:10 +0100)]
Switch os functions to camelcase.
José Fonseca [Thu, 27 Oct 2011 06:43:19 +0000 (07:43 +0100)]
Lower case namespaces.
José Fonseca [Wed, 26 Oct 2011 22:39:16 +0000 (23:39 +0100)]
Rename trace writer files to group nicely.
José Fonseca [Wed, 26 Oct 2011 22:37:01 +0000 (23:37 +0100)]
Re-organize the Trace::File code.
This should allow stop linking the zlib code from the wrappers.
José Fonseca [Wed, 26 Oct 2011 22:02:08 +0000 (23:02 +0100)]
Document coding syntax, and other development practices.
José Fonseca [Wed, 26 Oct 2011 07:19:12 +0000 (08:19 +0100)]
Add --color option when pipeing traceoutput to less.
José Fonseca [Wed, 26 Oct 2011 17:43:21 +0000 (18:43 +0100)]
Cleanup X11 event handling.
Fixes an infinite loop on GlxDrawable::show() in certain traces.
Zack Rusin [Wed, 26 Oct 2011 02:52:49 +0000 (22:52 -0400)]
Improve the indention in emacs just a bit.
By default emacs offsets both the inline and in-namespaces, lets
fix that.
José Fonseca [Tue, 25 Oct 2011 22:16:35 +0000 (23:16 +0100)]
Replace .emacs-dirvars with .dir-locals.el
Just basic whitespace formatting settings for all file types for now.
(And let the emacs pros do the rest later)
José Fonseca [Tue, 25 Oct 2011 08:57:01 +0000 (09:57 +0100)]
Document known issues.
Issue 47.
José Fonseca [Tue, 25 Oct 2011 08:56:15 +0000 (09:56 +0100)]
Emit a warning when the window size cannot be inferred.
Issue 47.
Carl Worth [Thu, 20 Oct 2011 22:22:09 +0000 (15:22 -0700)]
tracedump: Add tri-state --color option (auto, always, or never)
This follows a pattern similar to that provided by other tools, (such
as grep). The default auto mode colorizes if stdout is a tty. The always
and never modes explicit enable or disable colorizing.
The old --no-color and --no-colour options are deprecated, (no longer
documented but still supported to avoid any regressions of scripts).
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
José Fonseca [Sun, 23 Oct 2011 10:07:38 +0000 (11:07 +0100)]
Be more concise about DXSDK requirements.
José Fonseca [Thu, 20 Oct 2011 14:12:10 +0000 (16:12 +0200)]
retracediff: More helpful error message when glretrace is not found.
José Fonseca [Wed, 19 Oct 2011 15:28:49 +0000 (17:28 +0200)]
Trace glXCreateGLXPixmapMESA.
José Fonseca [Sun, 16 Oct 2011 13:15:36 +0000 (14:15 +0100)]
Generated code formatting improvements.
José Fonseca [Sat, 15 Oct 2011 14:10:06 +0000 (15:10 +0100)]
Cleanup Literal class.
José Fonseca [Sat, 15 Oct 2011 12:17:26 +0000 (13:17 +0100)]
Distinguish between tags and ids.
José Fonseca [Sat, 15 Oct 2011 10:21:15 +0000 (11:21 +0100)]
Remove dead base parameter to literal types.
Unnecessary given we encode it in binary form anyway.
José Fonseca [Sat, 15 Oct 2011 09:26:30 +0000 (10:26 +0100)]
Specify constant array lengths as integers.
José Fonseca [Fri, 14 Oct 2011 10:34:27 +0000 (11:34 +0100)]
Bring some of the virtual-memory-regions
Tracking user memory by querying virtual memory subsystem is not reboust
enough for master, but works in many cases, yielding much smaller and
efficient traces.
This change brings the ability of retracing traces generated by the
virtual-memory-regions branch.
It also brings more efficient tracing of glFlushMappedBufferRange calls.
The trace file version is bumped as a result.
José Fonseca [Fri, 14 Oct 2011 09:15:02 +0000 (10:15 +0100)]
Factor out polymorphic type generated code into functions.
José Fonseca [Fri, 14 Oct 2011 09:04:55 +0000 (10:04 +0100)]
Generate more compact switch statements for polymorphic types.
José Fonseca [Fri, 14 Oct 2011 09:04:12 +0000 (10:04 +0100)]
More polymorphic types in D3D9.
José Fonseca [Thu, 13 Oct 2011 08:52:52 +0000 (09:52 +0100)]
Allow basic specification of polymorphic types.
Unfortunately quite common in GL/D3D APIs. And this will help hanlding
better without less hand written code.
Just D3D9 for now as guinea pig.
José Fonseca [Thu, 13 Oct 2011 07:26:27 +0000 (08:26 +0100)]
Handle GLenums disguised as GLdoubles too.
José Fonseca [Tue, 11 Oct 2011 19:29:02 +0000 (20:29 +0100)]
Add comment about SetUnhandledExceptionFilter
José Fonseca [Tue, 11 Oct 2011 18:33:22 +0000 (19:33 +0100)]
Fix retracing of wglShareLists for currently bound contexts.
José Fonseca [Tue, 11 Oct 2011 18:33:02 +0000 (19:33 +0100)]
Handle null strings in json writer.
José Fonseca [Tue, 11 Oct 2011 18:32:30 +0000 (19:32 +0100)]
Avoid depending on MinGW runtime DLLs.
José Fonseca [Mon, 10 Oct 2011 19:51:43 +0000 (20:51 +0100)]
Add a few comments/links to Cocoa development resources.
José Fonseca [Mon, 10 Oct 2011 19:17:35 +0000 (20:17 +0100)]
Fix dumb typo.
José Fonseca [Mon, 10 Oct 2011 18:36:59 +0000 (19:36 +0100)]
Ignore several harmless CGL calls when rectracing.
José Fonseca [Fri, 7 Oct 2011 14:33:48 +0000 (15:33 +0100)]
Use Cocoa on Mac OS X.
It will enable better control for OpenGL context creation.