diff options
author | Marek Olšák <[email protected]> | 2017-08-28 23:28:33 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-29 13:18:37 +0200 |
commit | 79674066b6f98be96cb63a0332ac421858544a20 (patch) | |
tree | 494145a25ba150512fae204536924a17889e856b /src/mesa/state_tracker | |
parent | 43e8808b82b9ebaecde4a30984fef897c1a1a030 (diff) |
st/mesa: fix XPD lowering - don't read dst
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102461
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 916f7fa2e86..fa9fa440efd 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -562,8 +562,10 @@ compile_instruction( ureg_scalar(src[0], TGSI_SWIZZLE_X)); break; - case OPCODE_XPD: - ureg_MUL(ureg, ureg_writemask(dst[0], TGSI_WRITEMASK_XYZ), + case OPCODE_XPD: { + struct ureg_dst tmp = ureg_DECL_temporary(ureg); + + ureg_MUL(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_XYZ), ureg_swizzle(src[0], TGSI_SWIZZLE_Y, TGSI_SWIZZLE_Z, TGSI_SWIZZLE_X, 0), ureg_swizzle(src[1], TGSI_SWIZZLE_Z, TGSI_SWIZZLE_X, @@ -573,8 +575,9 @@ compile_instruction( TGSI_SWIZZLE_Y, 0), ureg_negate(ureg_swizzle(src[1], TGSI_SWIZZLE_Y, TGSI_SWIZZLE_Z, TGSI_SWIZZLE_X, 0)), - ureg_src(dst[0])); + ureg_src(tmp)); break; + } case OPCODE_RSQ: ureg_RSQ( ureg, dst[0], ureg_abs(src[0]) ); |