nvc0/ir: fix predicated PFETCH emission
[mesa.git] / src / gallium / drivers / nouveau / codegen / nv50_ir_emit_nvc0.cpp
index 1a4f6e09b75968cde753ab27c2b65534e2d26c2a..4ad098eed50fb89fbad39daa64b65170a5d76a83 100644 (file)
@@ -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