summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-04-07 23:23:25 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2017-04-07 23:31:01 -0400
commit57a744025a2f705d29f60b0eac6e50f8a1ea6203 (patch)
tree92011cc1f07245e95ed05479e0c76793d85544c5 /src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
parentbc68aa42bd7fcbbf5d388a3804c3b41cc71812a8 (diff)
nvc0/ir: fix overwriting of offset register with interpolateAtOffset
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp4
1 files 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]);