From eb22bd2072f17c2bd9ccf0f4aed70add9e7ea8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 9 Jan 2021 05:53:29 -0500 Subject: [PATCH] radeonsi: get out of si_emit_vs_state early for blit vertex shaders They don't use current_vs_state. Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index da9531e6ccc..20f9435719c 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -781,17 +781,17 @@ static void si_emit_rasterizer_prim_state(struct si_context *sctx) ALWAYS_INLINE static void si_emit_vs_state(struct si_context *sctx, unsigned index_size) { - if (sctx->vs_shader.cso->info.uses_base_vertex) { - sctx->current_vs_state &= C_VS_STATE_INDEXED; - sctx->current_vs_state |= S_VS_STATE_INDEXED(!!index_size); - } - if (sctx->num_vs_blit_sgprs) { /* Re-emit the state after we leave u_blitter. */ sctx->last_vs_state = ~0; return; } + if (sctx->vs_shader.cso->info.uses_base_vertex) { + sctx->current_vs_state &= C_VS_STATE_INDEXED; + sctx->current_vs_state |= S_VS_STATE_INDEXED(!!index_size); + } + if (sctx->current_vs_state != sctx->last_vs_state) { struct radeon_cmdbuf *cs = &sctx->gfx_cs;