vc4: Fix perspective interpolation.
authorEric Anholt <eric@anholt.net>
Fri, 19 Sep 2014 17:09:55 +0000 (10:09 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 19 Sep 2014 18:25:02 +0000 (11:25 -0700)
Fixes the mesa reflect demo and 6 tests under interpolation/

src/gallium/drivers/vc4/vc4_program.c

index a527f8b0e57c339b387047ce024e1da7de7831cb..38d0608480c48184c59497df8c476859d5477ef8 100644 (file)
@@ -852,7 +852,7 @@ emit_fragment_varying(struct vc4_compile *c, int index)
         };
 
         /* XXX: multiply by W */
-        return qir_VARY_ADD_C(c, qir_MOV(c, vary));
+        return qir_VARY_ADD_C(c, qir_FMUL(c, vary, qir_FRAG_W(c)));
 }
 
 static void