tools/apitrace.git
12 years agoStrip (non-standard) JSON comments.
José Fonseca [Sun, 11 Dec 2011 13:37:51 +0000 (13:37 +0000)]
Strip (non-standard) JSON comments.

12 years agoFail image comparison when there is a size mismatch.
José Fonseca [Sun, 11 Dec 2011 12:34:40 +0000 (12:34 +0000)]
Fail image comparison when there is a size mismatch.

12 years agoSimple buffer overflow detection on glGet*.
José Fonseca [Sun, 11 Dec 2011 12:33:55 +0000 (12:33 +0000)]
Simple buffer overflow detection on glGet*.

12 years agoMention PIL requirement.
José Fonseca [Sun, 11 Dec 2011 10:58:14 +0000 (10:58 +0000)]
Mention PIL requirement.

12 years agoFix typos in glparams.py causing stack corruption in glretrace
Remi Gillig [Wed, 7 Dec 2011 21:24:09 +0000 (22:24 +0100)]
Fix typos in glparams.py causing stack corruption in glretrace

12 years agoTrace enum signatures as a whole.
José Fonseca [Sun, 11 Dec 2011 10:33:55 +0000 (10:33 +0000)]
Trace enum signatures as a whole.

12 years agoPlug leak.
José Fonseca [Sat, 10 Dec 2011 21:17:07 +0000 (21:17 +0000)]
Plug leak.

12 years agoUpdate to-do.
José Fonseca [Sat, 10 Dec 2011 18:48:50 +0000 (18:48 +0000)]
Update to-do.

12 years agoAdd missing signal.h include.
José Fonseca [Sat, 10 Dec 2011 18:32:52 +0000 (18:32 +0000)]
Add missing signal.h include.

Should fix MacOSX build failures.

12 years agoUpdate some news.
José Fonseca [Sat, 10 Dec 2011 18:12:33 +0000 (18:12 +0000)]
Update some news.

12 years agoUse less on `apitrace dump`.
José Fonseca [Sat, 10 Dec 2011 18:07:25 +0000 (18:07 +0000)]
Use less on `apitrace dump`.

12 years agoFilter verbose calls on glretrace too.
José Fonseca [Sat, 10 Dec 2011 10:36:53 +0000 (10:36 +0000)]
Filter verbose calls on glretrace too.

12 years agoWorkaround a crash on MacOSX when reading the SAMPLER_BINDING state.
José Fonseca [Fri, 9 Dec 2011 19:25:10 +0000 (19:25 +0000)]
Workaround a crash on MacOSX when reading the SAMPLER_BINDING state.

12 years agoSupport creating GL 3.2 contexts on MacOSX.
José Fonseca [Fri, 9 Dec 2011 19:14:20 +0000 (19:14 +0000)]
Support creating GL 3.2 contexts on MacOSX.

12 years agoCleanup texture environment state dumping.
José Fonseca [Fri, 9 Dec 2011 17:03:01 +0000 (17:03 +0000)]
Cleanup texture environment state dumping.

12 years agoIgnore zero area viewports.
José Fonseca [Fri, 9 Dec 2011 16:52:26 +0000 (16:52 +0000)]
Ignore zero area viewports.

12 years agoTry to guess the proper visual to use for EGL contexts and drawables.
Alexandros Frantzis [Mon, 5 Dec 2011 09:43:32 +0000 (11:43 +0200)]
Try to guess the proper visual to use for EGL contexts and drawables.

For contexts, use the visual created for the current Profile. For
drawables, try to guess the proper visual from the requested config
and the last used profile.

12 years agoCreate a Visual for each Profile.
Alexandros Frantzis [Mon, 5 Dec 2011 09:35:35 +0000 (11:35 +0200)]
Create a Visual for each Profile.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
12 years agoTry to find the best matching EGL visual according to the profile.
Alexandros Frantzis [Fri, 2 Dec 2011 13:24:36 +0000 (15:24 +0200)]
Try to find the best matching EGL visual according to the profile.

The current method doesn't take into account the current profile, and it
may end up selecting an incompatible visual. To remedy this, this patch
adds support for different api bits lists for each profile. Each list
gives priority to the associated profile.

12 years agoAdd 'profile' parameter to glws::createVisual().
Alexandros Frantzis [Fri, 2 Dec 2011 12:35:44 +0000 (14:35 +0200)]
Add 'profile' parameter to glws::createVisual().

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
12 years agocmake: Link (e)glretrace against dl.
José Fonseca [Thu, 8 Dec 2011 19:56:16 +0000 (19:56 +0000)]
cmake: Link (e)glretrace against dl.

We depend on it now.

Should fix link failure due to missing dlsym() symbols.

12 years agocmake: Wrap glproc.hpp in a target to prevent concurrent generation.
José Fonseca [Wed, 7 Dec 2011 13:27:52 +0000 (13:27 +0000)]
cmake: Wrap glproc.hpp in a target to prevent concurrent generation.

Hopefully this does the trick.

12 years agocmake: Be more concise with the glproc.hpp dependency.
José Fonseca [Wed, 7 Dec 2011 12:54:23 +0000 (12:54 +0000)]
cmake: Be more concise with the glproc.hpp dependency.

Hopefully will fix some of random MSVC build failures.

12 years agojsondiff: Try to be more accurate w/ commas/newlines.
José Fonseca [Wed, 7 Dec 2011 10:59:02 +0000 (10:59 +0000)]
jsondiff: Try to be more accurate w/ commas/newlines.

Not quite right though.

12 years agoegl: Add EGLAttribList for attribute lists
Chia-I Wu [Wed, 7 Dec 2011 09:23:41 +0000 (17:23 +0800)]
egl: Add EGLAttribList for attribute lists

All attribute lists in EGL share the same type:

  Array(Const(EGLattrib), "__AttribList_size(attrib_list, EGL_NONE)")

Define EGLAttribList to save some typing.

12 years agoegl: Remove unneeded _EGLBoolean
Chia-I Wu [Wed, 7 Dec 2011 09:03:23 +0000 (17:03 +0800)]
egl: Remove unneeded _EGLBoolean

Use Enum instead of FakeEnum to eliminate the temporary type.

12 years agoegl: Add missing enum values
Chia-I Wu [Wed, 7 Dec 2011 09:37:59 +0000 (17:37 +0800)]
egl: Add missing enum values

Most of them are attribute values (e.g., EGL_SLOW_CONFIG), not attributes
(e.g., EGL_CONFIG_CAVEAT).  Attribute values were skipped before because the
type was named EGLConfigAttrib before.  Now that the type has a more general
name, it can have attribute values.

12 years agoegl: Merge various enum types
Chia-I Wu [Wed, 7 Dec 2011 09:03:50 +0000 (17:03 +0800)]
egl: Merge various enum types

Move most enums to EGLenum and add EGLattrib as an alias of EGLenum.  The idea
is that the same enum value may be used (or abused) in several places, and we
were forced to list the same enum in multiple types.

The difference between EGLenum and EGLattrib is that EGLattrib maps to EGLint
instead of EGLenum in C.

12 years agoEscape JSON strings correctly in jsondiff.py
José Fonseca [Wed, 7 Dec 2011 10:18:06 +0000 (10:18 +0000)]
Escape JSON strings correctly in jsondiff.py

12 years agoegl: trace EGL_NV_system_time
Chia-I Wu [Thu, 1 Dec 2011 06:57:24 +0000 (14:57 +0800)]
egl: trace EGL_NV_system_time

12 years agoegl: trace EGL_NV_coverage_sample_resolve
Chia-I Wu [Thu, 1 Dec 2011 06:54:33 +0000 (14:54 +0800)]
egl: trace EGL_NV_coverage_sample_resolve

12 years agoegl: trace EGL_ANGLE_query_surface_pointer and family
Chia-I Wu [Thu, 1 Dec 2011 06:49:53 +0000 (14:49 +0800)]
egl: trace EGL_ANGLE_query_surface_pointer and family

12 years agoegl: trace EGL_NV_post_sub_buffer
Chia-I Wu [Thu, 1 Dec 2011 06:47:02 +0000 (14:47 +0800)]
egl: trace EGL_NV_post_sub_buffer

12 years agoegl: trace EGL_MESA_drm_image
Chia-I Wu [Thu, 1 Dec 2011 06:43:54 +0000 (14:43 +0800)]
egl: trace EGL_MESA_drm_image

12 years agoegl: trace EGL_HI_clientpixmap and EGL_HI_colorformats
Chia-I Wu [Thu, 1 Dec 2011 06:14:36 +0000 (14:14 +0800)]
egl: trace EGL_HI_clientpixmap and EGL_HI_colorformats

12 years agoegl: trace EGL_NV_sync
Chia-I Wu [Wed, 30 Nov 2011 10:43:23 +0000 (18:43 +0800)]
egl: trace EGL_NV_sync

12 years agoegl: trace EGL_NV_depth_nonlinear
Chia-I Wu [Wed, 30 Nov 2011 10:35:40 +0000 (18:35 +0800)]
egl: trace EGL_NV_depth_nonlinear

12 years agoegl: trace EGL_NV_coverage_sample
Chia-I Wu [Wed, 30 Nov 2011 10:32:33 +0000 (18:32 +0800)]
egl: trace EGL_NV_coverage_sample

12 years agoegl: trace EGL_IMG_context_priority
Chia-I Wu [Wed, 30 Nov 2011 10:29:43 +0000 (18:29 +0800)]
egl: trace EGL_IMG_context_priority

12 years agoegl: trace EGL_KHR_reusable_sync and EGL_KHR_fence_sync
Chia-I Wu [Wed, 30 Nov 2011 10:21:45 +0000 (18:21 +0800)]
egl: trace EGL_KHR_reusable_sync and EGL_KHR_fence_sync

12 years agoegl: trace EGL_KHR_image_base and family
Chia-I Wu [Wed, 30 Nov 2011 09:58:03 +0000 (17:58 +0800)]
egl: trace EGL_KHR_image_base and family

12 years agoegl: trace EGL_KHR_lock_surface and EGL_KHR_lock_surface2
Chia-I Wu [Wed, 30 Nov 2011 09:52:40 +0000 (17:52 +0800)]
egl: trace EGL_KHR_lock_surface and EGL_KHR_lock_surface2

12 years agoRemove duplicate pthread linkage.
José Fonseca [Mon, 5 Dec 2011 09:53:28 +0000 (09:53 +0000)]
Remove duplicate pthread linkage.

12 years agoWorkaround weird issue with gdb and dlopen'ed libpthread.so
José Fonseca [Mon, 5 Dec 2011 09:53:28 +0000 (09:53 +0000)]
Workaround weird issue with gdb and dlopen'ed libpthread.so

12 years agoAdd option to request an Opengl 3.2 core profile context.
José Fonseca [Mon, 5 Dec 2011 09:44:52 +0000 (09:44 +0000)]
Add option to request an Opengl 3.2 core profile context.

12 years agoAdd option for jsondiff to ignore new state.
José Fonseca [Sun, 4 Dec 2011 15:32:03 +0000 (15:32 +0000)]
Add option for jsondiff to ignore new state.

Useful for the test suite.

12 years agoFix snapdiff ae method.
José Fonseca [Sun, 4 Dec 2011 15:31:31 +0000 (15:31 +0000)]
Fix snapdiff ae method.

12 years agoMerge pull request #61 from prahal/gui-edit
zackr [Sat, 3 Dec 2011 17:12:42 +0000 (09:12 -0800)]
Merge pull request #61 from prahal/gui-edit

gui: let the edit mode work.

12 years agoInclude unistd.h for symlink.
José Fonseca [Sat, 3 Dec 2011 11:00:32 +0000 (11:00 +0000)]
Include unistd.h for symlink.

Fixes build on Mac OS X 10.6.

12 years agoMerge branch 'glproc-cleanup'
José Fonseca [Sat, 3 Dec 2011 10:04:14 +0000 (10:04 +0000)]
Merge branch 'glproc-cleanup'

12 years agoCast native types to EGL types when calling EGL functions.
Alexandros Frantzis [Fri, 2 Dec 2011 12:22:56 +0000 (14:22 +0200)]
Cast native types to EGL types when calling EGL functions.

This is needed to resolve build failures on some platforms that support
various EGL backends and, therefore, native types.  Note that we can't
use reinterpret_cast<>() as the types involved are not necessarily
pointers or integers e.g. they can be typedef-ed types.

12 years agoUse libGLESv2.so.2 as the OpenGL ES 2.0 library SONAME.
Alexandros Frantzis [Fri, 2 Dec 2011 12:14:47 +0000 (14:14 +0200)]
Use libGLESv2.so.2 as the OpenGL ES 2.0 library SONAME.

Although the spec doesn't propose a SONAME, this seems to be the most
widely adopted name in the Linux world.

12 years agoFix typo in previous commit.
José Fonseca [Fri, 2 Dec 2011 16:13:31 +0000 (16:13 +0000)]
Fix typo in previous commit.

12 years agoFix build on certain mingw versions.
José Fonseca [Fri, 2 Dec 2011 15:56:46 +0000 (15:56 +0000)]
Fix build on certain mingw versions.

12 years agoIntroduce call flags.
José Fonseca [Wed, 30 Nov 2011 07:04:44 +0000 (07:04 +0000)]
Introduce call flags.

A central place for metainfo such as whether a call terminates a frame
or not, etc.

No trace format changes yet.  Will introduce them later after more
careful thought.

12 years agoMake the GLenum_int hack for MacOS robust against include order.
José Fonseca [Thu, 1 Dec 2011 21:36:31 +0000 (21:36 +0000)]
Make the GLenum_int hack for MacOS robust against include order.

12 years agoTry to do the right thing with EGL symbols.
José Fonseca [Fri, 2 Dec 2011 07:56:54 +0000 (07:56 +0000)]
Try to do the right thing with EGL symbols.

12 years agogui: let the edit mode work.
Alban Browaeys [Fri, 2 Dec 2011 03:29:05 +0000 (04:29 +0100)]
gui: let the edit mode work.

It was not allowing edition at least locally (Qt 4.7).
It turns out that the editor use the value to get the type . If positive
 the unsigned type is choosen :/
One cannot enter negative values anymore.

12 years agoFix glretrace on MacOSX.
José Fonseca [Thu, 1 Dec 2011 21:37:21 +0000 (21:37 +0000)]
Fix glretrace on MacOSX.

12 years agoMake the GLenum_int hack for MacOS robust against include order.
José Fonseca [Thu, 1 Dec 2011 21:36:31 +0000 (21:36 +0000)]
Make the GLenum_int hack for MacOS robust against include order.

12 years agoCleanup glproc.
José Fonseca [Thu, 1 Dec 2011 21:09:57 +0000 (21:09 +0000)]
Cleanup glproc.

Based on some of Alexandros Frantzis code/ideas.

12 years agoDon't call GLX functions when compiling the EGL retracer.
Alexandros Frantzis [Thu, 1 Dec 2011 13:59:23 +0000 (15:59 +0200)]
Don't call GLX functions when compiling the EGL retracer.

This is a temporary fix, until we implement a dedicated EGL-based,
GL/GLES1/GLES2 state dumping mechanism.

12 years agoProduce dispatchers for all functions, even in retrace mode.
Alexandros Frantzis [Thu, 1 Dec 2011 13:52:32 +0000 (15:52 +0200)]
Produce dispatchers for all functions, even in retrace mode.

12 years agoDon't free fbconfig.
José Fonseca [Thu, 1 Dec 2011 10:09:07 +0000 (10:09 +0000)]
Don't free fbconfig.

It doesn't belong to us.

Fixes segfault on exiting glretrace.

12 years agoReplace dynamic casts with static on glws.
José Fonseca [Thu, 1 Dec 2011 10:03:14 +0000 (10:03 +0000)]
Replace dynamic casts with static on glws.

We know as a fact that the type matches.

12 years agoMake gltxt.py obbey prefix option for types too.
José Fonseca [Thu, 1 Dec 2011 09:30:12 +0000 (09:30 +0000)]
Make gltxt.py obbey prefix option for types too.

12 years agoMinor cleanups and better documentation for the spec generation scripts.
José Fonseca [Thu, 1 Dec 2011 09:00:50 +0000 (09:00 +0000)]
Minor cleanups and better documentation for the spec generation scripts.

12 years agoUpdate docs.
José Fonseca [Tue, 29 Nov 2011 23:25:13 +0000 (23:25 +0000)]
Update docs.

12 years agoSupport 'apitrace diff-images' on Windows.
José Fonseca [Tue, 29 Nov 2011 11:01:05 +0000 (11:01 +0000)]
Support 'apitrace diff-images' on Windows.

12 years agoUpdate glws Cocoa bindings too.
José Fonseca [Tue, 29 Nov 2011 06:50:25 +0000 (06:50 +0000)]
Update glws Cocoa bindings too.

12 years agoRefactor the code to find scripts.
José Fonseca [Tue, 29 Nov 2011 00:25:12 +0000 (00:25 +0000)]
Refactor the code to find scripts.

Hopefully fixes scripts on Windows too, but untested yet.

12 years agoInstall snapdiff.py as well.
José Fonseca [Tue, 29 Nov 2011 00:22:41 +0000 (00:22 +0000)]
Install snapdiff.py as well.

12 years agoCache context profile in glws::Context.
José Fonseca [Mon, 28 Nov 2011 21:48:58 +0000 (21:48 +0000)]
Cache context profile in glws::Context.

12 years agoAllow to retrace with EGL too.
José Fonseca [Sun, 27 Nov 2011 15:16:34 +0000 (15:16 +0000)]
Allow to retrace with EGL too.

12 years agoAllow to specify an initial call no in the qapitrace command line.
José Fonseca [Sun, 27 Nov 2011 15:15:33 +0000 (15:15 +0000)]
Allow to specify an initial call no in the qapitrace command line.

12 years agoAdd "apitrace repack" command.
José Fonseca [Sun, 27 Nov 2011 12:32:00 +0000 (12:32 +0000)]
Add "apitrace repack" command.

12 years agoReturn read bytes in File::read().
José Fonseca [Sun, 27 Nov 2011 12:15:32 +0000 (12:15 +0000)]
Return read bytes in File::read().

12 years agoDon't call overridden virtual methods from the base destructor.
José Fonseca [Sun, 27 Nov 2011 12:18:24 +0000 (12:18 +0000)]
Don't call overridden virtual methods from the base destructor.

It causes the program to terminate with "pure virtual method called"
error, as the derived class members are no longer accessible.

12 years agoAlways try dlsym before get eglGetProcAddress
Kan-Ru Chen [Thu, 10 Nov 2011 02:57:04 +0000 (10:57 +0800)]
Always try dlsym before get eglGetProcAddress

Some implementation could return garbage from eglGetProcAddress

12 years agoAdd hyperlinks for non-ARB extensions too.
José Fonseca [Sun, 27 Nov 2011 12:04:13 +0000 (12:04 +0000)]
Add hyperlinks for non-ARB extensions too.

12 years agoRequire gles1 and gles2 modules for EGL support (fixes issue #58).
José Fonseca [Sat, 26 Nov 2011 10:50:39 +0000 (10:50 +0000)]
Require gles1 and gles2 modules for EGL support (fixes issue #58).

12 years agoFix GUI visualization of floating point values.
José Fonseca [Fri, 25 Nov 2011 13:37:37 +0000 (13:37 +0000)]
Fix GUI visualization of floating point values.

According to http://doc.qt.nokia.com/stable/qvariant.html#type ,
variant types are actually QMetaType::Type, which includes floats.

So handle the QMetaType::Float case everywhere.

12 years agoTrace via "apitrace trace" command.
José Fonseca [Fri, 25 Nov 2011 13:16:35 +0000 (13:16 +0000)]
Trace via "apitrace trace" command.

It could be done via the library directly, but this allows to use
QProcess as before, and therefore run asynchronously without extra effort.

12 years agoRemove unused includes from trace_file.cpp
Kan-Ru Chen [Fri, 25 Nov 2011 03:02:01 +0000 (11:02 +0800)]
Remove unused includes from trace_file.cpp

12 years agoAdd links to EXT_framebuffer_object spec.
José Fonseca [Fri, 25 Nov 2011 11:26:08 +0000 (11:26 +0000)]
Add links to EXT_framebuffer_object spec.

12 years agoFix internalformat determination for renderbuffers.
José Fonseca [Fri, 25 Nov 2011 11:15:06 +0000 (11:15 +0000)]
Fix internalformat determination for renderbuffers.

glGetRenderbufferParameteriv takes a target.

12 years agoCleanup and generalize os string class.
José Fonseca [Thu, 24 Nov 2011 20:09:41 +0000 (20:09 +0000)]
Cleanup and generalize os string class.

12 years agoKill glsnapshot.
José Fonseca [Thu, 24 Nov 2011 19:12:34 +0000 (19:12 +0000)]
Kill glsnapshot.

The ability of taking snaphshots while tracing was meant for test
automation of apitrace itself, but even so, it was not very robust
-- apps that used glXCreateWindow would not find be able to determine
window id --, so remove this now that a custom made test suite is
being developed.

12 years agoParse doubles to a new Double class rather than to the Float class.
Carl Worth [Thu, 17 Nov 2011 22:04:16 +0000 (14:04 -0800)]
Parse doubles to a new Double class rather than to the Float class.

This is simply a case of not discarding information. Without this, it would
not be possible to parse a trace and re-create the identical trace.

Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
12 years agoTODO: Fix typo in the description of the range specification.
Carl Worth [Wed, 16 Nov 2011 04:54:01 +0000 (20:54 -0800)]
TODO: Fix typo in the description of the range specification.

The syntax example was updated from using '@' to '/' some time ago,
but the description still had the old '@' symbol.

12 years agoPrevent segfault on glretrace crash (fixes issue #52).
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.

12 years agoAbort on failure to open trace (fixes issue #50).
José Fonseca [Thu, 24 Nov 2011 15:09:47 +0000 (15:09 +0000)]
Abort on failure to open trace (fixes issue #50).

12 years agosnapdiff: Drop the --version option
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).

12 years agoAdd "apitrace diff-images" command
Carl Worth [Sat, 12 Nov 2011 00:58:05 +0000 (16:58 -0800)]
Add "apitrace diff-images" command

Which simply calls out to the existing snapdiff.py script, (notably,
it also passes "apitrace diff-images --help" to snapdiff.py as well).

12 years agoEncode format as a member and not part of the label.
Zack Rusin [Thu, 17 Nov 2011 21:00:41 +0000 (16:00 -0500)]
Encode format as a member and not part of the label.

12 years agoFix MinGW-w64 build without DXSDK.
José Fonseca [Thu, 17 Nov 2011 15:47:17 +0000 (15:47 +0000)]
Fix MinGW-w64 build without DXSDK.

12 years agoAllow to enable/disable EGL support.
José Fonseca [Thu, 17 Nov 2011 15:45:10 +0000 (15:45 +0000)]
Allow to enable/disable EGL support.

As done with GUI, to avoid automagic dependencies.

12 years agoIgnore generated files.
José Fonseca [Tue, 15 Nov 2011 21:28:08 +0000 (21:28 +0000)]
Ignore generated files.

12 years agoFix whitespace in CMakeLists.txt.
José Fonseca [Tue, 15 Nov 2011 18:47:20 +0000 (18:47 +0000)]
Fix whitespace in CMakeLists.txt.

12 years agoKeep Copyright lines together.
José Fonseca [Tue, 15 Nov 2011 09:52:15 +0000 (09:52 +0000)]
Keep Copyright lines together.