From d899826733b1f6614c913c1c216f8157bf9e297d Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Thu, 5 Apr 2018 23:46:48 +0200 Subject: [PATCH] st/nine: Do not use scratch for face register Scratch registers are reused every instructions. Since vFace is reused, a new temporary register should be used. Fixes: https://github.com/iXit/Mesa-3D/issues/311 Signed-off-by: Axel Davy CC: "17.3 18.0" --- src/gallium/state_trackers/nine/nine_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index cc667ebfbcd..422df931c74 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -1079,7 +1079,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) case D3DSMO_FACE: if (ureg_src_is_undef(tx->regs.vFace)) { if (tx->face_is_sysval_integer) { - tmp = tx_scratch(tx); + tmp = ureg_DECL_temporary(ureg); tx->regs.vFace = ureg_DECL_system_value(ureg, TGSI_SEMANTIC_FACE, 0); -- 2.30.2