[Mesa-stable] [PATCH] st/nine: Do not use scratch for face register
Axel Davy
davyaxel0 at gmail.com
Fri Apr 6 21:32:29 UTC 2018
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 <davyaxel0 at gmail.com>
CC: "17.3 18.0" <mesa-stable at lists.freedesktop.org>
---
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 9b8bd16f8b..5d7f944f85 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -1104,7 +1104,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.16.2
More information about the mesa-stable
mailing list