Module: Mesa Branch: master Commit: a9d08a250ada5fbd4e3f78f8e4119ec295d692cf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9d08a250ada5fbd4e3f78f8e4119ec295d692cf
Author: Ilia Mirkin <imir...@alum.mit.edu> Date: Wed Apr 29 23:05:44 2015 -0400 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 <imir...@alum.mit.edu> Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 4 +++- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index d7c6b80..a6e6c1f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -1333,8 +1333,10 @@ CodeEmitterGK110::emitPFETCH(const Instruction *i) emitPredicate(i); + const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2) + defId(i->def(0), 2); - srcId(i->src(1), 10); + srcId(i, 1, 10); } void diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp index 1a4f6e0..4ad098e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp @@ -1495,8 +1495,10 @@ CodeEmitterNVC0::emitPFETCH(const Instruction *i) emitPredicate(i); + const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2) + defId(i->def(0), 14); - srcId(i->src(1), 20); + srcId(i, 1, 20); } void _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit