From: Yogesh mohan marimuthu Date: Tue, 15 Jun 2021 09:13:33 +0000 (+0530) Subject: radeonsi: set scratch_state dirty only if ctx->scratch_buffer allocated X-Git-Tag: upstream/22.3.5~20131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f9b3a70986b66a799145b461af4df74652078b7;p=platform%2Fupstream%2Fmesa.git radeonsi: set scratch_state dirty only if ctx->scratch_buffer allocated if ctx->scratch_buffer is NULL, then no need to update SPI_TMPRING_SIZE size register. Signed-off-by: Yogesh mohan marimuthu Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_gfx_cs.c b/src/gallium/drivers/radeonsi/si_gfx_cs.c index 8ecd92f..1e00198 100644 --- a/src/gallium/drivers/radeonsi/si_gfx_cs.c +++ b/src/gallium/drivers/radeonsi/si_gfx_cs.c @@ -557,9 +557,9 @@ void si_begin_new_gfx_cs(struct si_context *ctx, bool first_cs) memset(ctx->tracked_regs.spi_ps_input_cntl, 0xff, sizeof(uint32_t) * 32); } - si_mark_atom_dirty(ctx, &ctx->atoms.s.scratch_state); if (ctx->scratch_buffer) { si_context_add_resource_size(ctx, &ctx->scratch_buffer->b.b); + si_mark_atom_dirty(ctx, &ctx->atoms.s.scratch_state); } if (ctx->streamout.suspended) {