summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp20
1 files changed, 18 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 b1064bf0a92..d79f3060beb 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -1252,8 +1252,24 @@ CodeEmitterGK110::emitPIXLD(const Instruction *i)
void
CodeEmitterGK110::emitBAR(const Instruction *i)
{
- /* TODO */
- emitNOP(i);
+ code[0] = 0x00000002;
+ code[1] = 0x85400000;
+
+ switch (i->subOp) {
+ case NV50_IR_SUBOP_BAR_ARRIVE: code[1] |= 0x08; break;
+ case NV50_IR_SUBOP_BAR_RED_AND: code[1] |= 0x50; break;
+ case NV50_IR_SUBOP_BAR_RED_OR: code[1] |= 0x90; break;
+ case NV50_IR_SUBOP_BAR_RED_POPC: code[1] |= 0x10; break;
+ default:
+ code[1] |= 0x20;
+ assert(i->subOp == NV50_IR_SUBOP_BAR_SYNC);
+ break;
+ }
+
+ emitPredicate(i);
+
+ srcId(i->src(0), 10);
+ srcId(i->src(1), 23);
}
void