summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state_shaders.c
diff options
context:
space:
mode:
authorAxel Davy <axel.davy@ens.fr>2016-03-19 19:57:00 +0100
committerAxel Davy <axel.davy@ens.fr>2016-05-18 23:37:14 +0200
commitfc3533c088d61888f5eae8e11fff2e1120d21777 (patch)
treed5bebb7478b3059f380b72290b93c83d64bdcfca /src/gallium/drivers/radeonsi/si_state_shaders.c
parenta221f40dbb0d63f6b5478a25742ef3e0a3317a59 (diff)
downloadexternal_mesa3d-fc3533c088d61888f5eae8e11fff2e1120d21777.zip
external_mesa3d-fc3533c088d61888f5eae8e11fff2e1120d21777.tar.gz
external_mesa3d-fc3533c088d61888f5eae8e11fff2e1120d21777.tar.bz2
radeonsi: Change default behaviour for undefined COLOR0
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.davy@ens.fr> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state_shaders.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 11e7309..13066ff 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1406,6 +1406,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;
}