From d9baa004ea814bef70c8c90b342aca2ad992415c Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sat, 28 Apr 2012 18:04:05 +0200 Subject: [PATCH] nvc0/ir/emit: fix emitTXQ 2nd src --- src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp index 912540d0c40..48d99bfe803 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp @@ -1063,9 +1063,11 @@ CodeEmitterNVC0::emitTXQ(const TexInstruction *i) if (i->tex.sIndirectSrc >= 0 || i->tex.rIndirectSrc >= 0) code[1] |= 1 << 18; + const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2) + defId(i->def(0), 14); srcId(i->src(0), 20); - srcId(i->src(1), 26); + srcId(i, src1, 26); emitPredicate(i); } -- 2.30.2