nvc0/ir: fix barrier emission
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 28 Jul 2015 06:00:20 +0000 (02:00 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 28 Jul 2015 06:30:01 +0000 (02:30 -0400)
immediate arguments require a flag to be set for each one

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp

index 3ed815bad39fcbc5b4a2da08d9a69788304cd07f..f607f3ba3ecd97bd6e524f21dbe7e5226c5028f7 100644 (file)
@@ -1451,6 +1451,7 @@ CodeEmitterNVC0::emitBAR(const Instruction *i)
       ImmediateValue *imm = i->getSrc(0)->asImm();
       assert(imm);
       code[0] |= imm->reg.data.u32 << 20;
+      code[1] |= 0x8000;
    }
 
    // thread count
@@ -1461,6 +1462,7 @@ CodeEmitterNVC0::emitBAR(const Instruction *i)
       assert(imm);
       code[0] |= imm->reg.data.u32 << 26;
       code[1] |= imm->reg.data.u32 >> 6;
+      code[1] |= 0x4000;
    }
 
    if (i->srcExists(2) && (i->predSrc != 2)) {