aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/codegen
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-04-28 18:04:05 +0200
committerChristoph Bumiller <[email protected]>2012-04-29 17:55:13 +0200
commitd9baa004ea814bef70c8c90b342aca2ad992415c (patch)
treef0e6d6dbd7508f33d10727c98bc99dd7297c98bd /src/gallium/drivers/nvc0/codegen
parent3a9f036e008c5a905d1340f9247a1d7f50fd23dd (diff)
nvc0/ir/emit: fix emitTXQ 2nd src
Diffstat (limited to 'src/gallium/drivers/nvc0/codegen')
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp4
1 files changed, 3 insertions, 1 deletions
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);
}