From: Christoph Bumiller Date: Sat, 28 Apr 2012 16:04:05 +0000 (+0200) Subject: nvc0/ir/emit: fix emitTXQ 2nd src X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9baa004ea814bef70c8c90b342aca2ad992415c;p=mesa.git nvc0/ir/emit: fix emitTXQ 2nd src --- 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); }