radeonsi: don't add the border color buffer into the init_config state
authorMarek Olšák <marek.olsak@amd.com>
Sat, 23 May 2020 11:13:27 +0000 (07:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 26 Jun 2020 07:02:57 +0000 (07:02 +0000)
We might have to replace init_config for preemption.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5603>

src/gallium/drivers/radeonsi/si_gfx_cs.c
src/gallium/drivers/radeonsi/si_state.c

index 347230012aa5c3bbe42f00941abb82c9163be2c3..ed7b8c12b269cd757f90c9632f21a37b96b54349 100644 (file)
@@ -403,6 +403,9 @@ void si_begin_new_gfx_cs(struct si_context *ctx)
    ctx->flags |= SI_CONTEXT_INV_ICACHE | SI_CONTEXT_INV_SCACHE | SI_CONTEXT_INV_VCACHE |
                  SI_CONTEXT_INV_L2 | SI_CONTEXT_START_PIPELINE_STATS;
 
+   radeon_add_to_buffer_list(ctx, ctx->gfx_cs, ctx->border_color_buffer,
+                             RADEON_USAGE_READ, RADEON_PRIO_BORDER_COLORS);
+
    ctx->cs_shader_state.initialized = false;
    si_add_all_descriptors_to_bo_list(ctx);
    si_shader_pointers_mark_dirty(ctx);
index 485716678f42660a164d0057533ea809cda4456c..95775b4207d348b8a32f196c7dea8b7d8087e67b 100644 (file)
@@ -5348,7 +5348,6 @@ static void si_init_config(struct si_context *sctx)
    if (sctx->chip_class >= GFX7) {
       si_pm4_set_reg(pm4, R_028084_TA_BC_BASE_ADDR_HI, S_028084_ADDRESS(border_color_va >> 40));
    }
-   si_pm4_add_bo(pm4, sctx->border_color_buffer, RADEON_USAGE_READ, RADEON_PRIO_BORDER_COLORS);
 
    if (sctx->chip_class >= GFX9) {
       si_pm4_set_reg(pm4, R_028C48_PA_SC_BINNER_CNTL_1,