diff options
author | José Fonseca <[email protected]> | 2007-11-03 02:00:28 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-11-03 02:01:32 +0000 |
commit | 7a7899a2476592e846b908a557a738a49fa9a948 (patch) | |
tree | 58a2d2f5ef1a02d1e916e749d445f4617abe7aa0 /src/mesa/pipe/i915simple/i915_debug.c | |
parent | 5fa6ea68586e906a984291dd4c20f664924157eb (diff) |
Allow batch buffer debugging without calling i915_winsys->batch_start so often.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_debug.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_debug.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/pipe/i915simple/i915_debug.c b/src/mesa/pipe/i915simple/i915_debug.c index d142194d84c..d07d2f1fa95 100644 --- a/src/mesa/pipe/i915simple/i915_debug.c +++ b/src/mesa/pipe/i915simple/i915_debug.c @@ -822,20 +822,24 @@ static boolean i915_debug_packet( struct debug_stream *stream ) void -i915_dump_batchbuffer( struct i915_context *i915, - unsigned *start, - unsigned *end ) +i915_dump_batchbuffer( struct i915_context *i915 ) { struct debug_stream stream; + unsigned *start = i915->batch_start; + unsigned *end = i915->winsys->batch_start( i915->winsys, 0, 0 ); unsigned bytes = (end - start) * 4; boolean done = FALSE; - stream.offset = 0; stream.ptr = (char *)start; stream.print_addresses = 0; stream.winsys = i915->pipe.winsys; + if (!start || !end) { + stream.winsys->printf( stream.winsys, "\n\nBATCH: ???\n"); + return; + } + stream.winsys->printf( stream.winsys, "\n\nBATCH: (%d)\n", bytes / 4); while (!done && |