gk110/ir: add missing src predicate emission for BAR.RED
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 28 Feb 2016 21:44:24 +0000 (22:44 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 7 Mar 2016 17:39:48 +0000 (18:39 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp

index e5d638b5a8af4668749f54bb26c6fef5ae56d220..0d7d95e3105f7a65be39f391877075876e8d580e 100644 (file)
@@ -1300,6 +1300,14 @@ CodeEmitterGK110::emitBAR(const Instruction *i)
       code[1] |= imm->reg.data.u32 >> 9;
       code[1] |= 0x4000;
    }
+
+   if (i->srcExists(2) && (i->predSrc != 2)) {
+      srcId(i->src(2), 32 + 10);
+      if (i->src(2).mod == Modifier(NV50_IR_MOD_NOT))
+         code[1] |= 1 << 13;
+   } else {
+      code[1] |= 7 << 10;
+   }
 }
 
 void CodeEmitterGK110::emitMEMBAR(const Instruction *i)