-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas Sondergaard wrote:
> 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: I'm glad that someone picked up the python scripts and used them to generate something new. :) I guess that wasn't all wasted effort after all! > 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. Once upon a time, IBM had an OpenGL debugger on AIX called ZAPdb. It worked in a similar way to this. However, instead of "just" logging what calls were made, it would generate C code to replay the calls. You could run any application with it, compile the generated C code, run it, and see the exact same thing. It's very useful for both debugging applications *and* drivers. Before anyone asks, we tried to open-source it a few years ago. However, we had accepted patchs from other companies (who had licensed it for their platforms), so the license on the code wasn't all IBM's. > 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 :-) You'll also need to intercept glGetString and filter out extensions that the tracer doesn't know about. Otherwise people could call things like CombinerParameteriNV and wonder why it doesn't show up in the log. Hmm...it might be possible to catch the call from the driver to _glapi_add_dispatch and insert the wrapper function there. Since _glapi_add_dispatch gets a description of the parameters, you could use that to generate the output format. That might take some work. In any case, good work. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFEbIsLX1gOwKyEAw8RAneYAJ9SYFmdjEqJaOyQaa92uzrUUT1QdwCgiQhS vHzgSRHv3XiurqeszzpLztg= =CCtu -----END PGP SIGNATURE----- ------------------------------------------------------- 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
