summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-01-09 05:53:29 -0500
committerMarge Bot <eric+marge@anholt.net>2021-01-18 01:17:19 +0000
commiteb22bd2072f17c2bd9ccf0f4aed70add9e7ea8e9 (patch)
tree3aa77287ccc1886b6ac16b5816c329215a927e40
parent73709143d22d7485dbd319210344fc1d07faa8cd (diff)
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 <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.cpp10
1 files 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;