nvc0/ir: fix predicated PFETCH emission

src1 would contain the predicate, which would get emitted as a register
source by an undiscerning srcId helper. Work around this in the same way
as in emitTEX.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
Ilia Mirkin 2015-04-29 23:05:44 -04:00
parent 515ac907e6
commit a9d08a250a
2 changed files with 6 additions and 2 deletions

View file

@ -1333,8 +1333,10 @@ CodeEmitterGK110::emitPFETCH(const Instruction *i)
emitPredicate(i); emitPredicate(i);
const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2)
defId(i->def(0), 2); defId(i->def(0), 2);
srcId(i->src(1), 10); srcId(i, 1, 10);
} }
void void

View file

@ -1495,8 +1495,10 @@ CodeEmitterNVC0::emitPFETCH(const Instruction *i)
emitPredicate(i); emitPredicate(i);
const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2)
defId(i->def(0), 14); defId(i->def(0), 14);
srcId(i->src(1), 20); srcId(i, 1, 20);
} }
void void