st/nine: Initialize ps ff registers
authorAxel Davy <axel.davy@ens.fr>
Sun, 25 Sep 2016 12:55:04 +0000 (14:55 +0200)
committerAxel Davy <axel.davy@ens.fr>
Mon, 10 Oct 2016 21:43:50 +0000 (23:43 +0200)
Found with wine tests for the rTmp register.
Not sure for the other ones.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_ff.c

index 1fc96fbdc8a8bcc4c7d985766759d87729d09476..924cb4cc7e5e03b8e6548fd26a25cb8d56746cc4 100644 (file)
@@ -1326,6 +1326,11 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)
     ps.rTmpSrc = ureg_src(ps.rTmp);
     ps.rTexSrc = ureg_src(ps.rTex);
 
+    /* Initial values */
+    ureg_MOV(ureg, ps.rCur, ureg_imm1f(ureg, 0.0f));
+    ureg_MOV(ureg, ps.rTmp, ureg_imm1f(ureg, 0.0f));
+    ureg_MOV(ureg, ps.rTex, ureg_imm1f(ureg, 0.0f));
+
     for (s = 0; s < 8; ++s) {
         ps.s[s] = ureg_src_undef();