ln -s libGL.so build/linux-x86-debug/gallium/winsys/xlib/libGL.so.1
export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/gallium/winsys/xlib
- export GALLIUM_TRACE=y
ensure the right libGL.so is being picked by doing
and then try running
- glxinfo
+ GALLIUM_TRACE=tri.trace ./progs/trivial/tri
-which should create a gallium.*.trace file, which is an XML file. You can view
-copying trace.xsl and trace.css to the same directory, and opening with a
-XSLT capable browser like Firefox or Internet Explorer.
+which should create a tri.trace file, which is an XML file. You can view copying
+trace.xsl to the same directory, and opening with a XSLT capable browser like
+Firefox or Internet Explorer.
--
Jose Fonseca <jrfonseca@tungstengraphics.com>
boolean trace_dump_trace_begin()
{
- if(!debug_get_bool_option("GALLIUM_TRACE", FALSE))
+ const char *filename;
+
+ filename = debug_get_option("GALLIUM_TRACE", NULL);
+ if(!filename)
return FALSE;
if(!stream) {
- stream = trace_stream_create("gallium", "trace");
+ stream = trace_stream_create(filename);
if(!stream)
return FALSE;
struct trace_stream *
-trace_stream_create(const char *name, const char *ext)
+trace_stream_create(const char *filename)
{
struct trace_stream *stream;
- static unsigned file_no = 0;
- char filename[1024];
stream = CALLOC_STRUCT(trace_stream);
if(!stream)
goto error1;
- snprintf(filename, sizeof(filename), "%s.%u.%s", name, file_no, ext);
-
#if defined(PIPE_OS_LINUX)
stream->file = fopen(filename, "w");
if(!stream->file)
#include "pipe/p_compiler.h"
+
struct trace_stream;
struct trace_stream *
-trace_stream_create(const char *name, const char *ext);
+trace_stream_create(const char *filename);
boolean
trace_stream_write(struct trace_stream *stream, const void *data, size_t size);