st/nine: Saturate oFog and oPts vs outputs
authorAxel Davy <axel.davy@ens.fr>
Wed, 3 Dec 2014 13:47:24 +0000 (14:47 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Jan 2015 22:16:20 +0000 (22:16 +0000)
According to docs and Wine, these two vs outputs have
to be saturated.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/nine/nine_shader.c

index 79b0804c754c65b90d8f16082f3ade22fb7670d3..735f56b29f1f59df436d73ac2de977377c4466fc 100644 (file)
@@ -1011,13 +1011,13 @@ _tx_dst_param(struct shader_translator *tx, const struct sm1_dst_param *param)
         case 1:
             if (ureg_dst_is_undef(tx->regs.oFog))
                 tx->regs.oFog =
-                    ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_FOG, 0);
+                    ureg_saturate(ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_FOG, 0));
             dst = tx->regs.oFog;
             break;
         case 2:
             if (ureg_dst_is_undef(tx->regs.oPts))
                 tx->regs.oPts =
-                    ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_PSIZE, 0);
+                    ureg_saturate(ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_PSIZE, 0));
             dst = tx->regs.oPts;
             break;
         default: