From: Axel Davy Date: Thu, 5 Apr 2018 21:46:48 +0000 (+0200) Subject: st/nine: Do not use scratch for face register X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d899826733b1f6614c913c1c216f8157bf9e297d;p=mesa.git 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" --- 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);