summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-04-19 02:47:31 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:28 +0200
commit5b8afed87115c82cb48913fd47dfbfa347e4faa5 (patch)
tree84eff714b71e1f3e5f1b9436e877327480144b0b /src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
parentshader: Address feedback (diff)
downloadyuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.gz
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.bz2
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.lz
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.xz
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.tar.zst
yuzu-5b8afed87115c82cb48913fd47dfbfa347e4faa5.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
index 366dc6a0c..705aebd81 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp
@@ -12,8 +12,7 @@ void MemoryBarrier(EmitContext& ctx, spv::Scope scope) {
spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory |
spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AtomicCounterMemory |
spv::MemorySemanticsMask::ImageMemory};
- ctx.OpMemoryBarrier(ctx.Constant(ctx.U32[1], static_cast<u32>(scope)),
- ctx.Constant(ctx.U32[1], static_cast<u32>(semantics)));
+ ctx.OpMemoryBarrier(ctx.Const(static_cast<u32>(scope)), ctx.Const(static_cast<u32>(semantics)));
}
} // Anonymous namespace
@@ -22,9 +21,9 @@ void EmitBarrier(EmitContext& ctx) {
const auto memory{spv::Scope::Workgroup};
const auto memory_semantics{spv::MemorySemanticsMask::AcquireRelease |
spv::MemorySemanticsMask::WorkgroupMemory};
- ctx.OpControlBarrier(ctx.Constant(ctx.U32[1], static_cast<u32>(execution)),
- ctx.Constant(ctx.U32[1], static_cast<u32>(memory)),
- ctx.Constant(ctx.U32[1], static_cast<u32>(memory_semantics)));
+ ctx.OpControlBarrier(ctx.Const(static_cast<u32>(execution)),
+ ctx.Const(static_cast<u32>(memory)),
+ ctx.Const(static_cast<u32>(memory_semantics)));
}
void EmitWorkgroupMemoryBarrier(EmitContext& ctx) {