Thomas Sondergaard wrote:
Hi,

I stumbled upon mesa's gl_API.xml and the python scripts to process it to generate glx indirect rendering c-code. I've used these bits to generate an opengl tracer, that I thought might be useful for other people than me. The tracer is used like this:

LD_PRELOAD=/path/to/gltrace.so glxgears

The tracer can be configured using environment variables to log all opengl calls to a logfile or to call glGetError after all OpenGL calls and print the error and the stack trace when errors occur. Of course there is a significant overhead involved in snooping all OpenGL calls, but it is good support for debugging.

The attached gltrace.py generates c++ source that depends on a few logging macros and a function for obtaining the current stack trace that is not included, but they are mainly convenience wrappers around c++ iostreams and backtrace_symbols from <execinfo.h>.

I thought gltrace might be a candidate for inclusion as a utility in Mesa. If there is interest I could polish it up so other people can compile it than me :-)

This could certainly be useful. I have some code in the main/dispatch.c file that can be enabled to echo the GL calls to stdout, but it requires recompiling.

I'd be happy to include this in Mesa. Could you do a few more things though:

1. Update the comments to include your name in the Authors list.
2. Maybe include an option to omit the date/hostname/process ID from the output. Also, add a semicolon at the end of the line so that a trace can be copied and pasted into a C program for testing/debugging (I realize pointer-valued functions won't work). 3. Make a short README file (txt or html) that I can include in the docs that explains how to build/use the tracer.

-Brian


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to