radeonsi: set register_shadowing_enabled if AMD_DEBUG=shadowregs is set

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23687>
This commit is contained in:
Marek Olšák
2023-06-10 16:37:42 -04:00
committed by Marge Bot
parent f0eb548e7b
commit 229c3b7827
2 changed files with 4 additions and 2 deletions
@@ -21,8 +21,7 @@ static void si_set_context_reg_array(struct radeon_cmdbuf *cs, unsigned reg, uns
void si_init_cp_reg_shadowing(struct si_context *sctx)
{
if (sctx->has_graphics &&
(sctx->screen->info.register_shadowing_required ||
sctx->screen->debug_flags & DBG(SHADOW_REGS))) {
sctx->screen->info.register_shadowing_required) {
if (sctx->screen->info.has_fw_based_shadowing) {
sctx->shadowing.registers =
si_aligned_buffer_create(sctx->b.screen,
+3
View File
@@ -1149,6 +1149,9 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
sscreen->info.use_display_dcc_with_retile_blit = false;
}
if (sscreen->debug_flags & DBG(SHADOW_REGS))
sscreen->info.register_shadowing_required = true;
if (sscreen->debug_flags & DBG(NO_GFX))
sscreen->info.has_graphics = false;