Mesa (master): radeonsi: get out of si_emit_vs_state early for blit vertex shaders

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 18 01:33:15 UTC 2021


Module: Mesa
Branch: master
Commit: eb22bd2072f17c2bd9ccf0f4aed70add9e7ea8e9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb22bd2072f17c2bd9ccf0f4aed70add9e7ea8e9

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Jan  9 05:53:29 2021 -0500

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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

---

 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;
 



More information about the mesa-commit mailing list