mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-22 05:35:40 +01:00
Add OpMemoryBarrier
This commit is contained in:
parent
e1a6729df7
commit
12f40a8032
@ -364,6 +364,11 @@ public:
|
||||
/// Finish the current primitive and start a new one. No vertex is emitted.
|
||||
Id OpEndPrimitive();
|
||||
|
||||
// Barrier
|
||||
|
||||
/// Control the order that memory accesses are observed.
|
||||
Id OpMemoryBarrier(Id scope, Id semantics);
|
||||
|
||||
// Logical
|
||||
|
||||
/// Result is true if any component of Vector is true, otherwise result is false.
|
||||
|
@ -27,6 +27,7 @@ add_library(sirit
|
||||
instructions/extension.cpp
|
||||
instructions/image.cpp
|
||||
instructions/group.cpp
|
||||
instructions/barrier.cpp
|
||||
)
|
||||
|
||||
target_compile_options(sirit PRIVATE ${SIRIT_CXX_FLAGS})
|
||||
|
20
src/instructions/barrier.cpp
Normal file
20
src/instructions/barrier.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/* This file is part of the sirit project.
|
||||
* Copyright (c) 2019 sirit
|
||||
* This software may be used and distributed according to the terms of the
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpMemoryBarrier(Id scope, Id semantics) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpMemoryBarrier);
|
||||
op->Add(scope);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
Loading…
Reference in New Issue
Block a user