From: Nicolai Hähnle <nicolai.haeh...@amd.com> I noticed these after rebasing on current master, where the CE is disabled by default.
v2: fix some crashes when not using CE --- src/gallium/drivers/radeonsi/si_debug.c | 5 ++++- src/gallium/drivers/radeonsi/si_hw_context.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c index 7ad28a23dfc..e53ea3bf88d 100644 --- a/src/gallium/drivers/radeonsi/si_debug.c +++ b/src/gallium/drivers/radeonsi/si_debug.c @@ -405,7 +405,10 @@ static void si_log_cs(struct si_context *ctx, struct u_log_context *log, struct si_saved_cs *scs = ctx->current_saved_cs; unsigned gfx_cur = ctx->b.gfx.cs->prev_dw + ctx->b.gfx.cs->current.cdw; - unsigned ce_cur = ctx->ce_ib->prev_dw + ctx->ce_ib->current.cdw; + unsigned ce_cur = 0; + + if (ctx->ce_ib) + ce_cur = ctx->ce_ib->prev_dw + ctx->ce_ib->current.cdw; if (!dump_bo_list && gfx_cur == scs->gfx_last_dw && diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 73aea70434e..288a81e68b8 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -153,7 +153,8 @@ void si_context_gfx_flush(void *context, unsigned flags, /* Save the IB for debug contexts. */ radeon_save_cs(ws, cs, &ctx->current_saved_cs->gfx, true); - radeon_save_cs(ws, ctx->ce_ib, &ctx->current_saved_cs->ce, false); + if (ctx->ce_ib) + radeon_save_cs(ws, ctx->ce_ib, &ctx->current_saved_cs->ce, false); ctx->current_saved_cs->flushed = true; } -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev