st/nine: Fix specular enable for alpha
authorAxel Davy <axel.davy@ens.fr>
Tue, 22 Nov 2016 20:53:03 +0000 (21:53 +0100)
committerAxel Davy <axel.davy@ens.fr>
Tue, 20 Dec 2016 22:44:21 +0000 (23:44 +0100)
Apparently specular enable doesn't affect
the alpha channel.

Fixes https://github.com/iXit/Mesa-3D/issues/253

Behaviour comfirmed looking in wine sources.

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

index f4ec6aaccfa6cef53637ef8ea1b2990b78503ea9..7ff7331d880b737fb4d2ab7388d5eeaedd46f10a 100644 (file)
@@ -1528,7 +1528,7 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key)
     }
 
     if (key->specular)
-        ureg_ADD(ureg, ps.rCur, ps.rCurSrc, ps.vC[1]);
+        ureg_ADD(ureg, ureg_writemask(ps.rCur, TGSI_WRITEMASK_XYZ), ps.rCurSrc, ps.vC[1]);
 
     /* Fog.
      */