From dfa4a85ddf88cb6960b80a1bf062446f46e93067 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 29 Sep 2021 15:02:13 +0200 Subject: [PATCH] radeonsi: don't clear G_028644_OFFSET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- 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);