From d8125427cdcccbf15c7156eef923d54a66d89927 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 14 Aug 2022 03:27:53 -0400 Subject: [PATCH] radeonsi: move *rs to its only use in si_draw Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index b535d80..9e2573c 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -2343,7 +2343,6 @@ static void si_draw(struct pipe_context *ctx, } } - struct si_state_rasterizer *rs = sctx->queued.named.rasterizer; bool primitive_restart = info->primitive_restart && (!sctx->screen->options.prim_restart_tri_strips_only || @@ -2414,6 +2413,8 @@ static void si_draw(struct pipe_context *ctx, * until we pass the total_direct_count check and then it stays enabled until * the shader is changed. This eliminates most culling on/off state changes. */ (old_ngg_culling || total_direct_count > hw_vs->ngg_cull_vert_threshold)) { + struct si_state_rasterizer *rs = sctx->queued.named.rasterizer; + /* Check that the current shader allows culling. */ assert(hw_vs->ngg_cull_vert_threshold != UINT_MAX); -- 2.7.4