From d5f1253b0c4637ad996fd0da45095165006d61d3 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Tue, 30 Jun 2015 02:46:26 -0400 Subject: nv50/ir: fix emission of address reg in 3rd source Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91056 Signed-off-by: Ilia Mirkin Cc: "10.5 10.6" --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nouveau/codegen') diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index 1bfc8e32e84..6de8f45047a 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -499,10 +499,14 @@ CodeEmitterNV50::emitForm_MAD(const Instruction *i) setSrc(i, 2, 2); if (i->getIndirect(0, 0)) { - assert(!i->getIndirect(1, 0)); + assert(!i->srcExists(1) || !i->getIndirect(1, 0)); + assert(!i->srcExists(2) || !i->getIndirect(2, 0)); setAReg16(i, 0); - } else { + } else if (i->srcExists(1) && i->getIndirect(1, 0)) { + assert(!i->srcExists(2) || !i->getIndirect(2, 0)); setAReg16(i, 1); + } else { + setAReg16(i, 2); } } -- cgit v1.2.3