From: Ilia Mirkin Date: Sat, 8 Apr 2017 03:23:25 +0000 (-0400) Subject: nvc0/ir: fix overwriting of offset register with interpolateAtOffset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57a744025a2f705d29f60b0eac6e50f8a1ea6203;p=mesa.git nvc0/ir: fix overwriting of offset register with interpolateAtOffset Signed-off-by: Ilia Mirkin Cc: mesa-stable@lists.freedesktop.org --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 5eecce75347..1e2f6111fc4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -3015,8 +3015,8 @@ Converter::handleINTERP(Value *dst[4]) // and then convert to s32. Value *offs[2]; for (c = 0; c < 2; c++) { - offs[c] = fetchSrc(1, c); - mkOp2(OP_MIN, TYPE_F32, offs[c], offs[c], loadImm(NULL, 0.4375f)); + offs[c] = getScratch(); + mkOp2(OP_MIN, TYPE_F32, offs[c], fetchSrc(1, c), loadImm(NULL, 0.4375f)); mkOp2(OP_MAX, TYPE_F32, offs[c], offs[c], loadImm(NULL, -0.5f)); mkOp2(OP_MUL, TYPE_F32, offs[c], offs[c], loadImm(NULL, 4096.0f)); mkCvt(OP_CVT, TYPE_S32, offs[c], TYPE_F32, offs[c]);