From 57a744025a2f705d29f60b0eac6e50f8a1ea6203 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 7 Apr 2017 23:23:25 -0400 Subject: [PATCH] nvc0/ir: fix overwriting of offset register with interpolateAtOffset Signed-off-by: Ilia Mirkin Cc: mesa-stable@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]); -- 2.30.2