Mesa (main): radeonsi: don't clear G_028644_OFFSET

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 4 08:26:01 UTC 2021


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

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Wed Sep 29 15:02:13 2021 +0200

radeonsi: don't clear G_028644_OFFSET

Before 11d1309d827 this field was updated even when G_028644_PT_SPRITE_TEX was 0.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5423

Fixes: 11d1309d827 ("radeonsi: restructure si_get_ps_input_cntl for future refactoring")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13105>

---

 src/gallium/drivers/radeonsi/si_state_draw.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index 3999fb4eac2..ec1f10ca596 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -84,9 +84,9 @@ static void si_emit_spi_map(struct si_context *sctx)
       if (input.semantic == VARYING_SLOT_PNTC ||
           (input.semantic >= VARYING_SLOT_TEX0 && input.semantic <= VARYING_SLOT_TEX7 &&
            rs->sprite_coord_enable & (1 << (input.semantic - VARYING_SLOT_TEX0)))) {
-         /* Overwrite the whole value for sprite coordinates. */
-         ps_input_cntl = S_028644_OFFSET(0) |
-                         S_028644_PT_SPRITE_TEX(1);
+         /* Overwrite the whole value (except OFFSET) for sprite coordinates. */
+         ps_input_cntl &= ~C_028644_OFFSET;
+         ps_input_cntl |= S_028644_PT_SPRITE_TEX(1);
          if (input.fp16_lo_hi_valid & 0x1) {
             ps_input_cntl |= S_028644_FP16_INTERP_MODE(1) |
                              S_028644_ATTR0_VALID(1);



More information about the mesa-commit mailing list