summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-01-20 17:12:59 -0500
committerIlia Mirkin <[email protected]>2016-01-20 17:16:09 -0500
commit9f23007a7a56d576c8f20b76583ca2416e94a75d (patch)
treeacc628d5d0efb990b8c75838aa6723d962cc4d27 /src/gallium
parentf1152c3455d0fa1a8b3cafee2aaeffb31d5ba49b (diff)
gk110/ir: add partial BAR support
This is enough for the plain TGSI BARRIER implementation. Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-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