Andreas Hartmetz [Mon, 22 Jul 2013 17:56:40 +0000 (19:56 +0200)]
Use the correct terminator EGL_NONE for eglChooseConfig attrib_list.
José Fonseca [Sat, 20 Jul 2013 14:34:51 +0000 (15:34 +0100)]
Re-enable rtti again.
It causes problems with tr1/shared_ptr.h implementation on several platforms.
José Fonseca [Sat, 20 Jul 2013 14:34:24 +0000 (15:34 +0100)]
gltrace: Simplify AttribArray further.
Make it look more like an Array.
José Fonseca [Sat, 20 Jul 2013 14:27:29 +0000 (15:27 +0100)]
cgltrace: Fix CGLChoosePixelFormat prototype.
And implify AttribList in the process.
José Fonseca [Sat, 20 Jul 2013 14:06:01 +0000 (15:06 +0100)]
glretrace: Silence warning on wgl.
Nigel Stewart [Fri, 19 Jul 2013 14:32:47 +0000 (09:32 -0500)]
Build: Disable RTTI support at build-time to discourage the use of dynamic_cast, etc
Nigel Stewart [Thu, 18 Jul 2013 00:40:25 +0000 (19:40 -0500)]
glimports: Check for iOS and skip OpenGL and CGL as appropriate.
The Regal build for iOS supporting apitrace needs this
change to avoid a compilation error.
Nigel Stewart [Fri, 12 Jul 2013 14:30:41 +0000 (09:30 -0500)]
glretrace: GLX and WGL support for ES2/EGL traces.
I was able to glretrace Gears for Android on x86 Linux with
NVIDIA (non-DRI supporting) driver by enabling
GLX_CONTEXT_ES2_PROFILE_BIT_EXT for the
glXCreateContextAttribsARB path.
Unfortunately eglretrace via Mesa es2/egl doesn't seem
to be compatible the NVIDIA desktop driver.
José Fonseca [Sat, 20 Jul 2013 13:54:02 +0000 (14:54 +0100)]
wgltrace: Simplify pixel format attrib description.
No point is keeping two separate tables.
José Fonseca [Sat, 20 Jul 2013 13:53:14 +0000 (14:53 +0100)]
Merge branch 'attrib_list'
Conflicts:
specs/glxapi.py
José Fonseca [Sat, 20 Jul 2013 13:05:10 +0000 (14:05 +0100)]
wgltrace: Prevent duplicate variable declaration.
Peter Lohrmann [Wed, 10 Jul 2013 15:08:14 +0000 (11:08 -0400)]
qapitrace: Add option to replay in singlethreaded mode
Some traces fail to replay (hang) if glretrace does not have
--singelthread on the command line, this change makes a UI option
available.
José Fonseca [Fri, 19 Jul 2013 23:20:06 +0000 (00:20 +0100)]
glstate: Try to match the number of channels in internal format.
José Fonseca [Fri, 19 Jul 2013 22:30:48 +0000 (23:30 +0100)]
glstate: Better support for integer textures dumps.
Andreas Hartmetz [Fri, 12 Jul 2013 09:51:45 +0000 (11:51 +0200)]
Remove the last helper for the old incomplete attrib_list support.
Andreas Hartmetz [Fri, 12 Jul 2013 09:50:39 +0000 (11:50 +0200)]
WGL: Support float-based attrib_list parameters.
Followup to making it possible in the code generator.
Andreas Hartmetz [Fri, 12 Jul 2013 09:37:35 +0000 (11:37 +0200)]
Allow float-based attrib_lists as found in WGL.
It also turns out that no "type" member is needed in AttribArray,
so remove it.
Andreas Hartmetz [Fri, 12 Jul 2013 09:07:41 +0000 (11:07 +0200)]
Remove the now unused _AttribList_size.
_AttribPairList_size is still used for WGL's float-based attribs.
Andreas Hartmetz [Fri, 12 Jul 2013 09:49:39 +0000 (11:49 +0200)]
GLX: More consistent naming of an AttribArray.
Andreas Hartmetz [Fri, 12 Jul 2013 08:46:51 +0000 (10:46 +0200)]
Update GLX attrib_list support from GLX 1.3 to 1.4.
Andreas Hartmetz [Fri, 12 Jul 2013 08:12:11 +0000 (10:12 +0200)]
Warn on unknown attrib_list keys.
José Fonseca [Fri, 12 Jul 2013 06:48:22 +0000 (07:48 +0100)]
Aggregate all info on debugging into a single place.
Nigel Stewart [Wed, 10 Jul 2013 14:01:01 +0000 (09:01 -0500)]
Replace dynamic_cast with virtual functions.
apitrace can be built with without RTTI (runtime type information)
providing that dynamic_cast isn't used.
Andreas Hartmetz [Tue, 9 Jul 2013 22:12:39 +0000 (00:12 +0200)]
More WGL support. It's ugly and the resulting code probably doesn't compile.
Andreas Hartmetz [Tue, 9 Jul 2013 20:56:31 +0000 (22:56 +0200)]
attrib_list support for WGL function wglCreateContextAttribsARB.
Andreas Hartmetz [Tue, 9 Jul 2013 20:54:49 +0000 (22:54 +0200)]
attrib_list support for glXChooseVisual, the last GLX function.
It is one of the two functions known to apitrace that can have
attrib_list keys not followed by a value.
Andreas Hartmetz [Tue, 9 Jul 2013 20:52:46 +0000 (22:52 +0200)]
Use the right attrib_list terminator and support the remaining functions.
Remaining functions were
eglLockSurfaceKHR
eglCreateSyncKHR
eglCreateFenceSyncNV
Andreas Hartmetz [Tue, 9 Jul 2013 20:43:15 +0000 (22:43 +0200)]
Improvements in AttribArray / attrib/list code generation.
- Treat unknown keys the same way while counting elements and while
processing them (they are assumed to be followed by an int value).
- Support custom terminators.
- Serialize the terminator.
- Reduce the line count of generated code a bit.
- Add forgotten begin/endElement() around writing the keys.
- Improve comment wording.
Andreas Hartmetz [Tue, 9 Jul 2013 20:40:44 +0000 (22:40 +0200)]
Proper AttribArray / attrib_list support for applicable CGL functions.
It's just CGLChoosePixelFormat here.
Andreas Hartmetz [Tue, 9 Jul 2013 20:38:29 +0000 (22:38 +0200)]
Allow a custom terminator and support valueless keys better.
José Fonseca [Tue, 9 Jul 2013 15:35:14 +0000 (16:35 +0100)]
cli/sed: Very basic stream editing of traces.
Extremely limited, but have to start from somewhere.
José Fonseca [Tue, 9 Jul 2013 15:28:47 +0000 (16:28 +0100)]
cli/trim: Fix error message.
José Fonseca [Tue, 9 Jul 2013 12:27:00 +0000 (13:27 +0100)]
d3dstate: Dump compressed D3D10/11 textures.
José Fonseca [Tue, 9 Jul 2013 12:26:04 +0000 (13:26 +0100)]
directxtex: Fix assertion failures on MinGW.
José Fonseca [Tue, 9 Jul 2013 12:25:16 +0000 (13:25 +0100)]
d3dstate: Remove spurious statements.
José Fonseca [Mon, 8 Jul 2013 18:40:50 +0000 (19:40 +0100)]
wgltrace: Update wglapi.py from specs.
Via the scripts in the scripts subdir.
Might not be perfect but better than nothing.
José Fonseca [Mon, 8 Jul 2013 17:15:53 +0000 (18:15 +0100)]
glxtrace: Trace GLX_NV_present_video/GLX_NV_video_output/GLX_NV_video_capture calls minimally.
Nigel Stewart [Fri, 5 Jul 2013 16:49:11 +0000 (11:49 -0500)]
Support for Mac OS X 10.5 Leopard
CGLShareGroupObj and IOSurfaceRef were added in 10.6 Snow Leopard SDK
Add workarounds to glimports.hpp to support building for pre-10.6.
José Fonseca [Mon, 8 Jul 2013 14:40:36 +0000 (15:40 +0100)]
gui: Allow to edit strings.
Based upon the surrounding code. There might be a better way to achieve
it, but this seems better than no support.
Issue #159.
José Fonseca [Mon, 8 Jul 2013 12:46:45 +0000 (13:46 +0100)]
Use consistent cpp logic for including backtrace.h
__linux__ -> __ELF__
Vasil Dimov [Mon, 1 Jul 2013 07:16:02 +0000 (10:16 +0300)]
Skip apitrace from FirefoxOS if NDK is not present
Skip apitrace build when compiling FirefoxOS if NDK is not present in
prebuilt/ndk/android-ndk-r7.
Nigel Stewart [Wed, 3 Jul 2013 19:10:51 +0000 (14:10 -0500)]
Resolve C4267 MS compiler warnings
warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
Peter Lohrmann [Mon, 8 Jul 2013 12:20:31 +0000 (13:20 +0100)]
Delete the file object if the trace file could not be loaded due to being an unsupported (newer) version.
Fix small memory leak / assert if a trace file can't be loaded due to
being recorded with a newer version number than qapitrace. In this
scenario, there is no error message that gets shown in the UI, but the
title bar is updated with the trace file name, so the situation is very
confusing.
Andreas Hartmetz [Mon, 8 Jul 2013 10:36:11 +0000 (12:36 +0200)]
Proper AttribArray / attrib_list support for applicable GLX functions.
The functions are:
glXChooseFBConfig
glXCreateWindow
glXCreatePixmap
glXCreatePbuffer
glXChooseFBConfigSGIX
glXCreateGLXPbufferSGIX
glXBindTexImageEXT
glXBindVideoDeviceNV
Andreas Hartmetz [Mon, 8 Jul 2013 10:31:45 +0000 (12:31 +0200)]
Proper AttribArray / attrib_list support for applicable EGL functions.
The functions are:
eglChooseConfig
eglCreateWindowSurface
eglCreatePbufferSurface
eglCreatePixmapSurface
eglCreatePbufferFromClientBuffer
eglCreateContext
eglCreateImageKHR
eglCreateDRMImageMESA
Andreas Hartmetz [Sun, 7 Jul 2013 20:51:12 +0000 (22:51 +0200)]
Introduce AttribArray, a code generator for pseudo-type attrib_list.
Also use it for glXCreateConfigAttribsARB, which gives the expected
correct dumps in qapitrace and glretrace dump.
Nothing needs to change in dump code because it just reads whatever
types were written during tracing. Writing different types into
different array elements is allowed by the format, and it turns out
that even older versions of apitrace will correctly display dumps
created with this patch.
José Fonseca [Wed, 3 Jul 2013 15:02:03 +0000 (16:02 +0100)]
d3dretrace: Dump D3D11 textures too.
José Fonseca [Wed, 3 Jul 2013 14:48:30 +0000 (15:48 +0100)]
d3dretrace: Dump d3d10 PS resource shader views.
Nigel Stewart [Mon, 24 Jun 2013 20:40:44 +0000 (15:40 -0500)]
common: Add platform #ifdefs for non-cmake build convenience.
The cmake CMakeLists.txt file has logic for including or excluding certain
compilation units based on the platform: Windows, Linux or Mac OS X.
Other build systems are not as clever, it is convenient to also wrap
platform-specifics with #ifdef _WIN32 ... #endif to keep things simple on
the build side.
Nigel Stewart [Tue, 2 Jul 2013 22:34:00 +0000 (23:34 +0100)]
Resolve some MS compiler warnings (in picky mode)
warning C4267: 'argument' : conversion from 'size_t' to 'DWORD', possible loss of data
warning C4244: 'return' : conversion from 'double' to 'int', possible loss of data
José Fonseca [Fri, 28 Jun 2013 07:43:50 +0000 (08:43 +0100)]
Retry creating D3D10/11 devices without debug flags.
José Fonseca [Thu, 27 Jun 2013 15:15:01 +0000 (16:15 +0100)]
Only unbind dumpers when objects are truly released.
José Fonseca [Wed, 26 Jun 2013 20:13:13 +0000 (21:13 +0100)]
d3d9trace: Improve D3D9 shader size computation.
Still not bullet proof, but better than before.
Cass Everitt [Thu, 20 Jun 2013 00:30:32 +0000 (19:30 -0500)]
glretrace: swizzle locations into uniform arrays.
Where slot number is inferred.
Fixes issue #139.
v2: Prevent dereference of end() iterator -- Jose
José Fonseca [Tue, 18 Jun 2013 07:30:28 +0000 (08:30 +0100)]
Several documentation fixes.
José Fonseca [Tue, 18 Jun 2013 15:29:24 +0000 (16:29 +0100)]
Document the need to keep tracing robust.
For future reference.
José Fonseca [Mon, 17 Jun 2013 20:05:14 +0000 (21:05 +0100)]
os: Ensure len is properly computed on all getProcessName code paths.
And that truncate is always called.
Thanks to Alexander Monakov for spotting this.
José Fonseca [Mon, 17 Jun 2013 19:42:23 +0000 (20:42 +0100)]
os: Improve String with more comments and checks.
Thanks to Alexander Monakov for drawing attention to inconsistencies in
os::String::truncate(void).
Alexander Monakov [Mon, 17 Jun 2013 16:36:06 +0000 (20:36 +0400)]
egltrace/android: Fix tracing Zygote processes
The root cause of the problem was a bug in the implementation of
getZygoteProcessName. When the wrap.$procname approach is used, reading
/proc/cmdline produces "$procname\0/system/bin\0--application\0"... (with
embedded zero characters).
Fixed by simply not supplying length argument to the truncate call, which will
truncate to strlen(). The same bug is also present in getProcessName.
José Fonseca [Sun, 16 Jun 2013 08:42:51 +0000 (09:42 +0100)]
Use rand() on windows.
Carl Worth [Mon, 11 Mar 2013 20:22:05 +0000 (13:22 -0700)]
Use skiplist-based FastCallSet within trace::CallSet
The FastCallSet supports only ranges step of 1 and freq of
FREQUENCY_ALL, so store any such ranges there, and store all other
ranges in the existing, linear list of CallRange.
For manually entered call sets on the command line, the performance
hit of the linear lookup was not generally a problem. But when taking
the (potentially huge) output of "apitrace trim --print-callset" the
performance hit made things quite painful. This makes things usable
again.
Carl Worth [Mon, 11 Mar 2013 20:05:52 +0000 (13:05 -0700)]
Rename trim::CallSet to trace::FastCallSet
This is in preparation for being able to use this code to optimize the common
cases in trace::CallSet, (callsets without step or freq).
Carl Worth [Mon, 11 Mar 2013 19:14:06 +0000 (12:14 -0700)]
Extend trim::CallSet with a new range-based add method.
Previously, individual calls had to be added one-at-a-time. This was
adequate for trimming functionality where one call is examined at a
time.
But I'm now wanting to use this same CallSet code to dramatically
optimize the performance of callset specifications on the apitrace
command-line, (in particular large callsets resulting from "apitrace
trim --print-callset"). In this case, we really want to add entire
call ranges rather than just one call at a time.
Carl Worth [Wed, 22 Aug 2012 18:59:12 +0000 (11:59 -0700)]
trim: Use custom skiplist for required list (instead of std::set<unsigned>)
The std::set<unsigned>::insert method has been dominating profile
output for trimming large traces. Meanwhile, the access patterns of
TraceAnalyzer on the required list is extremely structured; it often
adds the next sequential integer. So we can optimize this data
structure dramatically with two additions:
1. Store ranges rather than single elements, so that the addition of
a new number can expand an existing range rather than inserting a
new element.
2. Remember the most recent element looked-up so that we can check
it first and not do any new lookup for in-order accesses.
With these two changes we get O(1) behavior for the access pattern of
adding sequential integers. For other cases we can still get
logarithmic behavior, but we can keep N dramatically smaller.
Unfortunately, we can't implement either change (that I can see) with
STL. I don't see any way to support lookup with range-based elements
in any STL data structure.
So here, I implement a skip-list based callset data structure. It
provides optimization (1) above and affords an easy implementation of
(2) as well, (though that is postponed to a later commit).
The skip-list implementation is ported from a C version which Keith
Packard and I implemented for cairo, and with the identical license as
the license of apitrace. The reference I used is the commit named
c2509f8a721ec489e1b44fa8a68be165363787a7 in the cairo repository.
In addition to changing from C to C++, I implemented range-based
elements.
José Fonseca [Sun, 16 Jun 2013 08:32:59 +0000 (09:32 +0100)]
Tweak the dev docs.
José Fonseca [Sun, 16 Jun 2013 08:20:31 +0000 (09:20 +0100)]
Fix trim doc.
Vinjn Zhang [Sat, 15 Jun 2013 10:54:16 +0000 (11:54 +0100)]
Fix pre-processor logic.
José Fonseca [Sat, 15 Jun 2013 10:31:53 +0000 (11:31 +0100)]
Prevent infinite recursion with Steam's overlay.
José Fonseca [Fri, 14 Jun 2013 22:47:06 +0000 (23:47 +0100)]
Update homepage link.
See https://github.com/blog/1452-new-github-pages-domain-github-io
Peter Lohrmann [Fri, 14 Jun 2013 16:11:10 +0000 (17:11 +0100)]
Add note about Qt and Windows 64 bits builds.
José Fonseca [Fri, 14 Jun 2013 10:14:06 +0000 (11:14 +0100)]
Cleanup known issues.
José Fonseca [Thu, 13 Jun 2013 14:51:48 +0000 (15:51 +0100)]
d3dretrace: Handle deferred d3d11 contexts better.
José Fonseca [Wed, 12 Jun 2013 22:28:42 +0000 (23:28 +0100)]
cli: Don't replace, but instead prepend the environment variable.
José Fonseca [Wed, 12 Jun 2013 22:13:09 +0000 (23:13 +0100)]
gltrace: Emit fake glViewport/glScissor calls the first time a context is bound.
This addresses issue #59.
José Fonseca [Wed, 12 Jun 2013 22:03:57 +0000 (23:03 +0100)]
gltrace: Also use dlopen.hpp for glxtrace.
Chad Versace [Thu, 6 Jun 2013 22:26:13 +0000 (15:26 -0700)]
egltrace/android: Fix tracing Zygote processes (v2)
Fixes egltrace.so on Android 4.2 x86.
Do not call trimDirectory() on the proc_name of Zygote processes, because
a Zyogote process name never contains a path separator. The proc_name of
a Zygote process is the application's package name (such as
com.exampe.myapp) because ActivityManager rewrites argv[0].
There exists an undiagnosed problem with trimDirectory, but I have been
unsuccessful diagnosing it. On the other hand, the call to trimDirectory
isn't needed and its removal fixes the bug's symptoms.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
José Fonseca [Tue, 11 Jun 2013 15:11:40 +0000 (16:11 +0100)]
Document what to expect in terms of trace size and CPU overhead.
See also issue #146.
José Fonseca [Tue, 11 Jun 2013 13:15:35 +0000 (14:15 +0100)]
Mention CMAKE_BUILD_TYPE on build instructions.
And recommend RelWithDebInfo. See also issue #145.
José Fonseca [Mon, 10 Jun 2013 07:05:29 +0000 (08:05 +0100)]
gltrace: Expose marker functions when tracing is disabled.
Matches the output of change proposed by Peter Lohrmann in issue #138,
but with slightly less new code.
This is achieved by adding a new hook point, doInvokeFunction (could not
think of a better name), used to generate the call to the real function,
both when trace is enabled or disabled.
José Fonseca [Mon, 10 Jun 2013 06:17:55 +0000 (07:17 +0100)]
glstate: Skip GL_COMPRESSED_TEXTURE_FORMATS when GL_NUM_COMPRESSED_TEXTURE_FORMATS is zero.
Should fix issue #144.
José Fonseca [Sun, 9 Jun 2013 10:00:20 +0000 (11:00 +0100)]
cli: Fix typo in earlier commit.
José Fonseca [Sun, 9 Jun 2013 08:27:13 +0000 (09:27 +0100)]
retrace: Don't output color when stdout is not a tty (issue #143).
To prevent tools that consume its output having to deal with ANSI
escape codes.
Gregory Hainaut [Sun, 9 Jun 2013 08:06:28 +0000 (09:06 +0100)]
gltrace: Prevent crash in _glGetDebugMessageLog_length (issue #140).
The function was not being called correctly from glGetDebugMessageLog
(and others).
From the spec the GL function:
lengths is an array provided by the application and count is the
maximum number of message that the driver will report into attribute
array (ie lengths). That mean if the driver report 3 messages only
lengths[0 to 2] are valid, others part are not valid and could have
random data.
Chirayu Desai [Sat, 8 Jun 2013 06:51:32 +0000 (12:21 +0530)]
Update android.toolchain.cmake to upstream commit
fd1f7055f8b7338644d58d9a2015a784dfa3a5ca
José Fonseca [Sat, 8 Jun 2013 13:05:19 +0000 (14:05 +0100)]
convert: Fix issues convertin trace -> pix.
José Fonseca [Fri, 7 Jun 2013 07:55:03 +0000 (08:55 +0100)]
glstate: Use helper function for flushing GL errors.
José Fonseca [Fri, 7 Jun 2013 07:50:03 +0000 (08:50 +0100)]
glstate: Avoid inlining so much code.
MacOSX compilation times in release mode with clang went from 10min to
1hr. Hopefully this will help bring them to sane figures.
José Fonseca [Tue, 4 Jun 2013 15:59:21 +0000 (16:59 +0100)]
retrace: Remove the -c/--compare=PREFIX .
That is, remove the ability to compare images while replaying.
For several reasons:
- This duplicates diff-images command.
- It is less versatile -- it is unable to output diff images.
- It will be necessary to change how snapshots are done to properly
accommodate APIs that have no concept of current context, like
Direct3D APIs, so the less fat on this code the better.
José Fonseca [Sat, 1 Jun 2013 17:11:02 +0000 (18:11 +0100)]
cgltrace: DYLD_INSERT_LIBRARIES -> DYLD_INTERPOSE
José Fonseca [Sat, 1 Jun 2013 10:23:44 +0000 (11:23 +0100)]
cgltrace: Add prototypes for all undocumented functions.
Not sure they are correct, but it should be better than nothing.
José Fonseca [Sat, 1 Jun 2013 09:28:07 +0000 (10:28 +0100)]
doc: Mention optional linux dependencies.
José Fonseca [Sat, 1 Jun 2013 09:26:58 +0000 (10:26 +0100)]
retrace: Don't try to recreate existing directories.
Gregory Hainaut [Tue, 28 May 2013 18:52:56 +0000 (20:52 +0200)]
eglretrace: Fix some EGL typos.
* Properly set the current API. Otherwise several egl function are lost (eglGetCurrentContext return NULL)
* Use read enum for the read surface
José Fonseca [Thu, 30 May 2013 22:29:34 +0000 (23:29 +0100)]
glstate: Recognize GL_ARB_program_interface_query params.
José Fonseca [Thu, 30 May 2013 18:17:38 +0000 (19:17 +0100)]
glstate: Dump parameters for array and multisample texture targets.
José Fonseca [Thu, 30 May 2013 18:16:51 +0000 (19:16 +0100)]
glstate: Pick a face when dumping cube map level parameters.
glGetTexLevelParameter(GL_TEXTURE_CUBE_MAP) is invalid.
José Fonseca [Thu, 30 May 2013 18:15:58 +0000 (19:15 +0100)]
glstate: Flush previous GL errors before trying to get parameters.
José Fonseca [Thu, 30 May 2013 16:15:32 +0000 (17:15 +0100)]
cli: Allow to use `apitrace trace` from MSVC build directories.
Also add a bit more verbose output when searching for wrappers.
José Fonseca [Thu, 30 May 2013 16:11:35 +0000 (17:11 +0100)]
cli: Prevent NULL pointer deref when trace verbose output is enabled.
Vladimír Vondruš [Thu, 30 May 2013 13:47:05 +0000 (14:47 +0100)]
libbacktrace: Fix compilation failure (issue #137).
It seems that elf.c for some reason includes snappy/config.h instead of
its own generated config.h, possbily due to wrong order of include
directories. Solved it by explicitly including
${CMAKE_CURRENT_BINARY_DIR} before all other paths.