radeonsi: replace si_screen::has_out_of_order_rast with the radeon_info field
authorMarek Olšák <marek.olsak@amd.com>
Sat, 18 Feb 2023 09:44:28 +0000 (04:44 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 24 Feb 2023 21:27:24 +0000 (21:27 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>

src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_shaders.cpp

index e753a45..38d40c3 100644 (file)
@@ -1312,8 +1312,8 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
       (sscreen->info.gfx_level == GFX6 && sscreen->info.pfp_fw_version >= 79 &&
        sscreen->info.me_fw_version >= 142);
 
-   sscreen->has_out_of_order_rast =
-      sscreen->info.has_out_of_order_rast && !(sscreen->debug_flags & DBG(NO_OUT_OF_ORDER));
+   if (sscreen->debug_flags & DBG(NO_OUT_OF_ORDER))
+      sscreen->info.has_out_of_order_rast = false;
 
    if (sscreen->info.gfx_level >= GFX11) {
       sscreen->use_ngg = true;
index 7a1eefe..d0392be 100644 (file)
@@ -578,7 +578,6 @@ struct si_screen {
    unsigned pbb_context_states_per_bin;
    unsigned pbb_persistent_states_per_bin;
    bool has_draw_indirect_multi;
-   bool has_out_of_order_rast;
    bool dpbb_allowed;
    bool use_ngg;
    bool use_ngg_culling;
index 72d39b5..4222b53 100644 (file)
@@ -763,7 +763,7 @@ static void si_bind_blend_state(struct pipe_context *ctx, void *state)
         old_blend->cb_target_enabled_4bit != blend->cb_target_enabled_4bit))
       si_mark_atom_dirty(sctx, &sctx->atoms.s.dpbb_state);
 
-   if (sctx->screen->has_out_of_order_rast &&
+   if (sctx->screen->info.has_out_of_order_rast &&
        ((old_blend->blend_enable_4bit != blend->blend_enable_4bit ||
          old_blend->cb_target_enabled_4bit != blend->cb_target_enabled_4bit ||
          old_blend->commutative_4bit != blend->commutative_4bit ||
@@ -1446,7 +1446,7 @@ static void si_bind_dsa_state(struct pipe_context *ctx, void *state)
                                        old_dsa->db_can_write != dsa->db_can_write)))
       si_mark_atom_dirty(sctx, &sctx->atoms.s.dpbb_state);
 
-   if (sctx->screen->has_out_of_order_rast &&
+   if (sctx->screen->info.has_out_of_order_rast &&
        (memcmp(old_dsa->order_invariance, dsa->order_invariance,
                sizeof(old_dsa->order_invariance))))
       si_mark_atom_dirty(sctx, &sctx->atoms.s.msaa_config);
@@ -3134,7 +3134,7 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
    if (sctx->framebuffer.any_dst_linear != old_any_dst_linear)
       si_mark_atom_dirty(sctx, &sctx->atoms.s.msaa_config);
 
-   if (sctx->screen->has_out_of_order_rast &&
+   if (sctx->screen->info.has_out_of_order_rast &&
        (sctx->framebuffer.colorbuf_enabled_4bit != old_colorbuf_enabled_4bit ||
         !!sctx->framebuffer.state.zsbuf != old_has_zsbuf ||
         (zstex && zstex->surface.has_stencil != old_has_stencil)))
@@ -3702,7 +3702,7 @@ static bool si_out_of_order_rasterization(struct si_context *sctx)
    struct si_state_blend *blend = sctx->queued.named.blend;
    struct si_state_dsa *dsa = sctx->queued.named.dsa;
 
-   if (!sctx->screen->has_out_of_order_rast)
+   if (!sctx->screen->info.has_out_of_order_rast)
       return false;
 
    unsigned colormask = sctx->framebuffer.colorbuf_enabled_4bit;
index 4188584..0daa486 100644 (file)
@@ -3628,7 +3628,7 @@ static void si_bind_ps_shader(struct pipe_context *ctx, void *state)
       if (!old_sel || old_sel->info.colors_written != sel->info.colors_written)
          si_mark_atom_dirty(sctx, &sctx->atoms.s.cb_render_state);
 
-      if (sctx->screen->has_out_of_order_rast &&
+      if (sctx->screen->info.has_out_of_order_rast &&
           (!old_sel || old_sel->info.base.writes_memory != sel->info.base.writes_memory ||
            old_sel->info.base.fs.early_fragment_tests !=
               sel->info.base.fs.early_fragment_tests))