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@gmail.com>
CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
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);