From 58539e976bf6332d9397c37f7a8c152f964ca9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 14 Aug 2022 03:57:58 -0400 Subject: [PATCH] radeonsi: move fixing ngg_culling into si_update_shaders Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 89ac7e990df..055f5919f2e 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -377,6 +377,12 @@ static bool si_update_shaders(struct si_context *sctx) } } + /* si_shader_select_with_key can clear the ngg_culling in the shader key if the shader + * compilation hasn't finished. Set it to the same value in si_context. + */ + if (GFX_VERSION >= GFX10 && NGG) + sctx->ngg_culling = si_get_vs_inline(sctx, HAS_TESS, HAS_GS)->current->key.ge.opt.ngg_culling; + sctx->do_update_shaders = false; return true; } @@ -2437,12 +2443,6 @@ static void si_draw(struct pipe_context *ctx, DRAW_CLEANUP; return; } - - /* si_update_shaders can clear the ngg_culling in the shader key if the shader compilation - * hasn't finished. Set it to the correct value in si_context. - */ - if (GFX_VERSION >= GFX10 && NGG) - sctx->ngg_culling = si_get_vs_inline(sctx, HAS_TESS, HAS_GS)->current->key.ge.opt.ngg_culling; } /* Since we've called si_context_add_resource_size for vertex buffers,