aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_hw_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-07-31 01:34:44 +0200
committerMarek Olšák <[email protected]>2017-08-01 17:06:38 +0200
commit1aeafb59e6bee72fdf847cac904694b200fe5c6f (patch)
treec341bf48d62cb46306ea82906ed05ed86f236a5e /src/gallium/drivers/radeonsi/si_hw_context.c
parent1482861abee4686dbb4290c6e9f77b445a4963ce (diff)
radeonsi: print CE IBs into ddebug reports
Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_hw_context.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_hw_context.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index 92d0cc51dd6..f2dfcc7cc5e 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -145,7 +145,9 @@ void si_context_gfx_flush(void *context, unsigned flags,
if (ctx->is_debug) {
/* Save the IB for debug contexts. */
radeon_clear_saved_cs(&ctx->last_gfx);
- radeon_save_cs(ws, cs, &ctx->last_gfx);
+ radeon_save_cs(ws, cs, &ctx->last_gfx, true);
+ radeon_clear_saved_cs(&ctx->last_ce);
+ radeon_save_cs(ws, ctx->ce_ib, &ctx->last_ce, false);
r600_resource_reference(&ctx->last_trace_buf, ctx->trace_buf);
r600_resource_reference(&ctx->trace_buf, NULL);
}
@@ -173,16 +175,16 @@ void si_context_gfx_flush(void *context, unsigned flags,
void si_begin_new_cs(struct si_context *ctx)
{
if (ctx->is_debug) {
- uint32_t zero = 0;
+ static const uint32_t zeros[2];
/* Create a buffer used for writing trace IDs and initialize it to 0. */
assert(!ctx->trace_buf);
ctx->trace_buf = (struct r600_resource*)
pipe_buffer_create(ctx->b.b.screen, 0,
- PIPE_USAGE_STAGING, 4);
+ PIPE_USAGE_STAGING, 8);
if (ctx->trace_buf)
pipe_buffer_write_nooverlap(&ctx->b.b, &ctx->trace_buf->b.b,
- 0, sizeof(zero), &zero);
+ 0, sizeof(zeros), zeros);
ctx->trace_id = 0;
}