From d61cd39026637671560e780d5f8224b4c468280c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 18 Feb 2023 04:44:28 -0500 Subject: [PATCH] radeonsi: replace si_screen::has_out_of_order_rast with the radeon_info field Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_pipe.c | 4 ++-- src/gallium/drivers/radeonsi/si_pipe.h | 1 - src/gallium/drivers/radeonsi/si_state.c | 8 ++++---- src/gallium/drivers/radeonsi/si_state_shaders.cpp | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index e753a451b28..38d40c38ad8 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 7a1eefede7a..d0392bece54 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 72d39b5966b..4222b53ab40 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -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; diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 4188584fd46..0daa4866705 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -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))