diff options
author | Axel Davy <[email protected]> | 2016-09-25 21:20:23 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-10-10 23:43:50 +0200 |
commit | 71e7292a85cf6fffef87bed075ebfdde61180054 (patch) | |
tree | a79c2cad51ade9478803c44a7320d263fae70980 /src | |
parent | 732cea09cdae896b8f2be2c9706fedb48ed06f3e (diff) |
st/nine: Fix specular w coordinate
Found looking at Wine formulas.
Fixes a few visual issues.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index a10f8c78129..4bb7836350f 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -787,7 +787,7 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) /* Light.*.Alpha is not used. */ struct ureg_dst rD = ureg_writemask(ureg_DECL_temporary(ureg), TGSI_WRITEMASK_XYZ); struct ureg_dst rA = ureg_writemask(ureg_DECL_temporary(ureg), TGSI_WRITEMASK_XYZ); - struct ureg_dst rS = ureg_writemask(ureg_DECL_temporary(ureg), TGSI_WRITEMASK_XYZ); + struct ureg_dst rS = ureg_DECL_temporary(ureg); struct ureg_src mtlP = _XXXX(MATERIAL_CONST(4)); @@ -915,10 +915,8 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) /* Set alpha factors of illumination to 1.0 for the multiplications. */ rD.WriteMask = TGSI_WRITEMASK_W; rD.Saturate = 0; - rS.WriteMask = TGSI_WRITEMASK_W; rS.Saturate = 0; rA.WriteMask = TGSI_WRITEMASK_W; rA.Saturate = 0; ureg_MOV(ureg, rD, ureg_imm1f(ureg, 1.0f)); - ureg_MOV(ureg, rS, ureg_imm1f(ureg, 1.0f)); /* Apply to material: * @@ -959,7 +957,7 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) ureg_ADD(ureg, ureg_writemask(oCol[0], TGSI_WRITEMASK_W), vs->mtlD, _W(tmp)); ureg_release_temporary(ureg, tmp); } - ureg_MUL(ureg, oCol[1], ureg_imm4f(ureg, 0.0f, 0.0f, 0.0f, 1.0f), vs->mtlS); + ureg_MOV(ureg, oCol[1], ureg_imm1f(ureg, 0.0f)); } else { ureg_MOV(ureg, oCol[0], vs->aCol[0]); ureg_MOV(ureg, oCol[1], vs->aCol[1]); |