diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-17 08:21:03 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:28 +0200 |
commit | 0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0 (patch) | |
tree | 809cb00a8188a76cb5585379d9982d9e52fcd0e6 /src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp | |
parent | spirv: Fix implicit lod type (diff) | |
download | yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.gz yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.bz2 yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.lz yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.xz yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.tar.zst yuzu-0a0818c0259b4f90f1f7bb37fcffbc1f194ca4d0.zip |
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp index 74f523d0f..366dc6a0c 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_barriers.cpp @@ -7,7 +7,7 @@ namespace Shader::Backend::SPIRV { namespace { -void EmitMemoryBarrierImpl(EmitContext& ctx, spv::Scope scope) { +void MemoryBarrier(EmitContext& ctx, spv::Scope scope) { const auto semantics{ spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory | spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AtomicCounterMemory | @@ -27,16 +27,12 @@ void EmitBarrier(EmitContext& ctx) { ctx.Constant(ctx.U32[1], static_cast<u32>(memory_semantics))); } -void EmitMemoryBarrierWorkgroupLevel(EmitContext& ctx) { - EmitMemoryBarrierImpl(ctx, spv::Scope::Workgroup); +void EmitWorkgroupMemoryBarrier(EmitContext& ctx) { + MemoryBarrier(ctx, spv::Scope::Workgroup); } -void EmitMemoryBarrierDeviceLevel(EmitContext& ctx) { - EmitMemoryBarrierImpl(ctx, spv::Scope::Device); -} - -void EmitMemoryBarrierSystemLevel(EmitContext& ctx) { - EmitMemoryBarrierImpl(ctx, spv::Scope::CrossDevice); +void EmitDeviceMemoryBarrier(EmitContext& ctx) { + MemoryBarrier(ctx, spv::Scope::Device); } } // namespace Shader::Backend::SPIRV |