diff options
author | Samuel Pitoiset <[email protected]> | 2015-12-02 22:05:17 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2015-12-02 22:44:53 +0100 |
commit | 8482763d35d8bbf596a7cce84bb53f4b73d5fa6f (patch) | |
tree | 4a0cac6b59674de6c9a1b44637f2b225346dff5b /src/gallium | |
parent | c672bf3b043ffd1b29d796f9c52a79d1014397ae (diff) |
nv50/ir/gk110: add memory barriers support for GK110
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 12 |
1 files changed, 12 insertions, 0 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 053df8be7d3..0e52c73b322 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -75,6 +75,7 @@ private: void emitLOAD(const Instruction *); void emitSTORE(const Instruction *); void emitMOV(const Instruction *); + void emitMEMBAR(const Instruction *); void emitINTERP(const Instruction *); void emitAFETCH(const Instruction *); @@ -1687,6 +1688,14 @@ CodeEmitterGK110::emitMOV(const Instruction *i) } } +void CodeEmitterGK110::emitMEMBAR(const Instruction *i) +{ + code[0] = 0x00000002 | NV50_IR_SUBOP_MEMBAR_SCOPE(i->subOp) << 8; + code[1] = 0x7cc00000; + + emitPredicate(i); +} + bool CodeEmitterGK110::emitInstruction(Instruction *insn) { @@ -1918,6 +1927,9 @@ CodeEmitterGK110::emitInstruction(Instruction *insn) case OP_BAR: emitBAR(insn); break; + case OP_MEMBAR: + emitMEMBAR(insn); + break; case OP_PHI: case OP_UNION: case OP_CONSTRAINT: |