mirror of
https://github.com/yuzu-emu/sirit
synced 2024-11-26 04:47:59 +00:00
barrier: Add OpControlBarrier
This commit is contained in:
parent
414fc4dbd2
commit
a62c5bbc10
2 changed files with 11 additions and 0 deletions
|
@ -366,6 +366,9 @@ public:
|
||||||
|
|
||||||
// Barrier
|
// Barrier
|
||||||
|
|
||||||
|
/// Wait for other invocations of this module to reach the current point of execution.
|
||||||
|
Id OpControlBarrier(Id execution, Id memory, Id semantics);
|
||||||
|
|
||||||
/// Control the order that memory accesses are observed.
|
/// Control the order that memory accesses are observed.
|
||||||
Id OpMemoryBarrier(Id scope, Id semantics);
|
Id OpMemoryBarrier(Id scope, Id semantics);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,14 @@
|
||||||
|
|
||||||
namespace Sirit {
|
namespace Sirit {
|
||||||
|
|
||||||
|
Id Module::OpControlBarrier(Id execution, Id memory, Id semantics) {
|
||||||
|
auto op = std::make_unique<Op>(spv::Op::OpControlBarrier);
|
||||||
|
op->Add(execution);
|
||||||
|
op->Add(memory);
|
||||||
|
op->Add(semantics);
|
||||||
|
return AddCode(std::move(op));
|
||||||
|
}
|
||||||
|
|
||||||
Id Module::OpMemoryBarrier(Id scope, Id semantics) {
|
Id Module::OpMemoryBarrier(Id scope, Id semantics) {
|
||||||
auto op = std::make_unique<Op>(spv::Op::OpMemoryBarrier);
|
auto op = std::make_unique<Op>(spv::Op::OpMemoryBarrier);
|
||||||
op->Add(scope);
|
op->Add(scope);
|
||||||
|
|
Loading…
Reference in a new issue