From 4ed3d5ee571bc25e04759667f632810c6ccb749e Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sun, 25 Sep 2016 14:50:32 +0200 Subject: [PATCH] st/nine: Do not pollute rTmp in ff ps Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/nine_ff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index 680b9671552..1fc96fbdc8a 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -1429,9 +1429,11 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key) if (dim == 4) ureg_TXP(ureg, ps.rTex, target, texture_coord, ps.s[s]); else { - ureg_RCP(ureg, ureg_writemask(ps.rTmp, TGSI_WRITEMASK_X), ureg_scalar(texture_coord, dim-1)); - ureg_MUL(ureg, ps.rTmp, _XXXX(ps.rTmpSrc), texture_coord); + struct ureg_dst tmp = ureg_DECL_temporary(ureg); + ureg_RCP(ureg, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(texture_coord, dim-1)); + ureg_MUL(ureg, ps.rTmp, _X(tmp), texture_coord); ureg_TEX(ureg, ps.rTex, target, ps.rTmpSrc, ps.s[s]); + ureg_release_temporary(ureg, tmp); } } else { ureg_TEX(ureg, ps.rTex, target, texture_coord, ps.s[s]); -- 2.30.2