radeonsi: remove uses_reg_shadowing parameter from si_init_gfx_preamble_state
authorMarek Olšák <marek.olsak@amd.com>
Sun, 11 Jun 2023 01:54:50 +0000 (21:54 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 22 Jun 2023 08:35:55 +0000 (08:35 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

src/gallium/drivers/radeonsi/si_cp_reg_shadowing.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state.h

index 80272e9..2d73740 100644 (file)
@@ -53,7 +53,7 @@ void si_init_cp_reg_shadowing(struct si_context *sctx)
       }
    }
 
-   si_init_gfx_preamble_state(sctx, sctx->shadowing.registers != NULL);
+   si_init_gfx_preamble_state(sctx);
 
    if (sctx->shadowing.registers) {
       /* We need to clear the shadowed reg buffer. */
index 44a5558..29c53a0 100644 (file)
@@ -5557,7 +5557,7 @@ unsigned gfx103_get_cu_mask_ps(struct si_screen *sscreen)
    return u_bit_consecutive(0, sscreen->info.min_good_cu_per_sa);
 }
 
-static void gfx6_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg_shadowing)
+static void gfx6_init_gfx_preamble_state(struct si_context *sctx)
 {
    struct si_screen *sscreen = sctx->screen;
    uint64_t border_color_va =
@@ -5571,7 +5571,7 @@ static void gfx6_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg_
    if (!pm4)
       return;
 
-   if (sctx->has_graphics && !uses_reg_shadowing) {
+   if (sctx->has_graphics && !sctx->shadowing.registers) {
       si_pm4_cmd_add(pm4, PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
       si_pm4_cmd_add(pm4, CC0_UPDATE_LOAD_ENABLES(1));
       si_pm4_cmd_add(pm4, CC1_UPDATE_SHADOW_ENABLES(1));
@@ -5832,7 +5832,7 @@ static void cdna_init_compute_preamble_state(struct si_context *sctx)
    sctx->cs_preamble_state_tmz = si_pm4_clone(pm4); /* Make a copy of the preamble for TMZ. */
 }
 
-static void gfx10_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg_shadowing)
+static void gfx10_init_gfx_preamble_state(struct si_context *sctx)
 {
    struct si_screen *sscreen = sctx->screen;
    uint64_t border_color_va =
@@ -5856,7 +5856,7 @@ static void gfx10_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg
    if (!pm4)
       return;
 
-   if (sctx->has_graphics && !uses_reg_shadowing) {
+   if (sctx->has_graphics && !sctx->shadowing.registers) {
       si_pm4_cmd_add(pm4, PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
       si_pm4_cmd_add(pm4, CC0_UPDATE_LOAD_ENABLES(1));
       si_pm4_cmd_add(pm4, CC1_UPDATE_SHADOW_ENABLES(1));
@@ -6129,12 +6129,12 @@ done:
    sctx->cs_preamble_state_tmz = si_pm4_clone(pm4); /* Make a copy of the preamble for TMZ. */
 }
 
-void si_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg_shadowing)
+void si_init_gfx_preamble_state(struct si_context *sctx)
 {
    if (!sctx->screen->info.has_graphics)
       cdna_init_compute_preamble_state(sctx);
    else if (sctx->gfx_level >= GFX10)
-      gfx10_init_gfx_preamble_state(sctx, uses_reg_shadowing);
+      gfx10_init_gfx_preamble_state(sctx);
    else
-      gfx6_init_gfx_preamble_state(sctx, uses_reg_shadowing);
+      gfx6_init_gfx_preamble_state(sctx);
 }
index ed6f060..f7d7489 100644 (file)
@@ -553,7 +553,7 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf);
 void si_init_state_compute_functions(struct si_context *sctx);
 void si_init_state_functions(struct si_context *sctx);
 void si_init_screen_state_functions(struct si_screen *sscreen);
-void si_init_gfx_preamble_state(struct si_context *sctx, bool uses_reg_shadowing);
+void si_init_gfx_preamble_state(struct si_context *sctx);
 void si_make_buffer_descriptor(struct si_screen *screen, struct si_resource *buf,
                                enum pipe_format format, unsigned offset, unsigned num_elements,
                                uint32_t *state);