diff options
author | Axel Davy <[email protected]> | 2017-03-26 22:57:15 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2017-04-13 20:05:03 +0200 |
commit | 442780ea373cbea7d138e9cfa8c4857bb8118b3a (patch) | |
tree | 2086ffa4b5bdf68586e812398a6ff3e1f6dc3f46 /src/gallium/state_trackers | |
parent | d8ffe4d0ce954218461218d0cc7c83d6832f0d98 (diff) |
st/nine: Fix support for ps 1.4 dw and dz modifiers
RCP was used incorrectly to support NINED3DSPSM_DW and
NINED3DSPSM_DZ. src.x was used as input instead of src.w
or src.z.
Fixes: https://github.com/iXit/Mesa-3D/issues/271
Signed-off-by: Axel Davy <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 6dcd97603d4..40fb6be88f4 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -1116,14 +1116,14 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) case NINED3DSPSM_DW: tmp = tx_scratch(tx); /* NOTE: app is not allowed to read w with this modifier */ - ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_3), src); + ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_3), ureg_scalar(src, TGSI_SWIZZLE_W)); ureg_MUL(ureg, tmp, src, ureg_swizzle(ureg_src(tmp), NINE_SWIZZLE4(W,W,W,W))); src = ureg_src(tmp); break; case NINED3DSPSM_DZ: tmp = tx_scratch(tx); /* NOTE: app is not allowed to read z with this modifier */ - ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_2), src); + ureg_RCP(ureg, ureg_writemask(tmp, NINED3DSP_WRITEMASK_2), ureg_scalar(src, TGSI_SWIZZLE_Z)); ureg_MUL(ureg, tmp, src, ureg_swizzle(ureg_src(tmp), NINE_SWIZZLE4(Z,Z,Z,Z))); src = ureg_src(tmp); break; |