mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
Allow batch buffer debugging without calling i915_winsys->batch_start so often.
This commit is contained in:
parent
5fa6ea6858
commit
7a7899a247
4 changed files with 15 additions and 13 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#define BATCH_LOCALS
|
||||
|
||||
#define BEGIN_BATCH( dwords, relocs ) \
|
||||
i915->winsys->batch_start( i915->winsys, dwords, relocs )
|
||||
(i915->batch_start = i915->winsys->batch_start( i915->winsys, dwords, relocs ))
|
||||
|
||||
#define OUT_BATCH( dword ) \
|
||||
i915->winsys->batch_dword( i915->winsys, dword )
|
||||
|
|
@ -44,10 +44,10 @@
|
|||
|
||||
#define ADVANCE_BATCH()
|
||||
|
||||
#define FLUSH_BATCH() do { \
|
||||
if (0) i915_dump_batchbuffer( i915, i915->batch_start, BEGIN_BATCH(0, 0) ); \
|
||||
i915->winsys->batch_flush( i915->winsys ); \
|
||||
i915->batch_start = BEGIN_BATCH(0, 0); \
|
||||
#define FLUSH_BATCH() do { \
|
||||
if (0) i915_dump_batchbuffer( i915 ); \
|
||||
i915->winsys->batch_flush( i915->winsys ); \
|
||||
i915->batch_start = NULL; \
|
||||
i915->hardware_dirty = ~0; \
|
||||
} while (0)
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ struct pipe_context *i915_create( struct pipe_winsys *pipe_winsys,
|
|||
|
||||
/* Batch stream debugging is a bit hacked up at the moment:
|
||||
*/
|
||||
i915->batch_start = BEGIN_BATCH(0, 0);
|
||||
i915->batch_start = NULL;
|
||||
|
||||
/*
|
||||
* XXX we could plug GL selection/feedback into the drawing pipeline
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -79,9 +79,7 @@ void i915_print_ureg(const char *msg, unsigned ureg);
|
|||
#endif
|
||||
|
||||
|
||||
void i915_dump_batchbuffer( struct i915_context *i915,
|
||||
unsigned *start,
|
||||
unsigned *end );
|
||||
void i915_dump_batchbuffer( struct i915_context *i915 );
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue