iris: Print the batch name when decoding
This commit is contained in:
parent
2727a942a4
commit
587e438128
|
@ -140,11 +140,13 @@ iris_init_batch(struct iris_batch *batch,
|
||||||
struct iris_vtable *vtbl,
|
struct iris_vtable *vtbl,
|
||||||
struct pipe_debug_callback *dbg,
|
struct pipe_debug_callback *dbg,
|
||||||
struct iris_batch **all_batches,
|
struct iris_batch **all_batches,
|
||||||
|
const char *name,
|
||||||
uint8_t engine)
|
uint8_t engine)
|
||||||
{
|
{
|
||||||
batch->screen = screen;
|
batch->screen = screen;
|
||||||
batch->vtbl = vtbl;
|
batch->vtbl = vtbl;
|
||||||
batch->dbg = dbg;
|
batch->dbg = dbg;
|
||||||
|
batch->name = name;
|
||||||
|
|
||||||
/* engine should be one of I915_EXEC_RENDER, I915_EXEC_BLT, etc. */
|
/* engine should be one of I915_EXEC_RENDER, I915_EXEC_BLT, etc. */
|
||||||
assert((engine & ~I915_EXEC_RING_MASK) == 0);
|
assert((engine & ~I915_EXEC_RING_MASK) == 0);
|
||||||
|
@ -456,9 +458,9 @@ _iris_batch_flush_fence(struct iris_batch *batch,
|
||||||
second_bytes = bytes_for_commands;
|
second_bytes = bytes_for_commands;
|
||||||
bytes_for_commands += batch->primary_batch_size;
|
bytes_for_commands += batch->primary_batch_size;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%19s:%-3d: Batchbuffer flush with %5d+%5db (%0.1f%%) "
|
fprintf(stderr, "%19s:%-3d: %s batch [%u] flush with %5d+%5db (%0.1f%%) "
|
||||||
"(cmds), %4d BOs (%0.1fMb aperture)\n",
|
"(cmds), %4d BOs (%0.1fMb aperture)\n",
|
||||||
file, line,
|
file, line, batch->name, batch->hw_ctx_id,
|
||||||
batch->primary_batch_size, second_bytes,
|
batch->primary_batch_size, second_bytes,
|
||||||
100.0f * bytes_for_commands / BATCH_SZ,
|
100.0f * bytes_for_commands / BATCH_SZ,
|
||||||
batch->exec_count,
|
batch->exec_count,
|
||||||
|
|
|
@ -49,6 +49,9 @@ struct iris_batch {
|
||||||
struct iris_vtable *vtbl;
|
struct iris_vtable *vtbl;
|
||||||
struct pipe_debug_callback *dbg;
|
struct pipe_debug_callback *dbg;
|
||||||
|
|
||||||
|
/** The name of this batch for debug info (e.g. "render") */
|
||||||
|
const char *name;
|
||||||
|
|
||||||
/** Current batchbuffer being queued up. */
|
/** Current batchbuffer being queued up. */
|
||||||
struct iris_bo *bo;
|
struct iris_bo *bo;
|
||||||
void *map;
|
void *map;
|
||||||
|
@ -109,6 +112,7 @@ void iris_init_batch(struct iris_batch *batch,
|
||||||
struct iris_vtable *vtbl,
|
struct iris_vtable *vtbl,
|
||||||
struct pipe_debug_callback *dbg,
|
struct pipe_debug_callback *dbg,
|
||||||
struct iris_batch **other_batches,
|
struct iris_batch **other_batches,
|
||||||
|
const char *name,
|
||||||
uint8_t ring);
|
uint8_t ring);
|
||||||
void iris_chain_to_new_batch(struct iris_batch *batch);
|
void iris_chain_to_new_batch(struct iris_batch *batch);
|
||||||
void iris_batch_free(struct iris_batch *batch);
|
void iris_batch_free(struct iris_batch *batch);
|
||||||
|
|
|
@ -215,10 +215,11 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||||
&ice->render_batch,
|
&ice->render_batch,
|
||||||
&ice->compute_batch,
|
&ice->compute_batch,
|
||||||
};
|
};
|
||||||
|
const char *batch_names[IRIS_BATCH_COUNT] = { "render", "compute", };
|
||||||
|
|
||||||
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
|
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
|
||||||
iris_init_batch(batches[i], screen, &ice->vtbl, &ice->dbg,
|
iris_init_batch(batches[i], screen, &ice->vtbl, &ice->dbg,
|
||||||
batches, I915_EXEC_RENDER);
|
batches, batch_names[i], I915_EXEC_RENDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
ice->vtbl.init_render_context(screen, &ice->render_batch, &ice->vtbl,
|
ice->vtbl.init_render_context(screen, &ice->render_batch, &ice->vtbl,
|
||||||
|
|
Loading…
Reference in New Issue