d3d 9 needs COLOR0 to be 1.0 on all channels when
undefined. 0.0 for the others is fine.
GL behaviour is undefined.

Signed-off-by: Axel Davy <axel.d...@ens.fr>
---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c 
b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 0248958..b788ae0 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1473,6 +1473,9 @@ static unsigned si_get_ps_input_cntl(struct si_context 
*sctx,
                 * Don't set any other bits.
                 * (FLAT_SHADE=1 completely changes behavior) */
                ps_input_cntl = S_028644_OFFSET(0x20);
+               /* D3D 9 behaviour. GL is undefined */
+               if (name == TGSI_SEMANTIC_COLOR && index == 0)
+                       ps_input_cntl |= S_028644_DEFAULT_VAL(3);
        }
        return ps_input_cntl;
 }
-- 
2.7.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to