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/frontend/maxwell/translate | |
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/frontend/maxwell/translate')
-rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/barrier_operations.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/barrier_operations.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/barrier_operations.cpp index 2a2a294df..86e433e41 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/barrier_operations.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/barrier_operations.cpp @@ -12,34 +12,24 @@ namespace Shader::Maxwell { namespace { // Seems to be in CUDA terminology. enum class LocalScope : u64 { - CTG = 0, - GL = 1, - SYS = 2, - VC = 3, + CTA, + GL, + SYS, + VC, }; - -IR::MemoryScope LocalScopeToMemoryScope(LocalScope scope) { - switch (scope) { - case LocalScope::CTG: - return IR::MemoryScope::Workgroup; - case LocalScope::GL: - return IR::MemoryScope::Device; - case LocalScope::SYS: - return IR::MemoryScope::System; - default: - throw NotImplementedException("Unimplemented Local Scope {}", scope); - } -} - } // Anonymous namespace void TranslatorVisitor::MEMBAR(u64 inst) { union { u64 raw; BitField<8, 2, LocalScope> scope; - } membar{inst}; + } const membar{inst}; - ir.MemoryBarrier(LocalScopeToMemoryScope(membar.scope)); + if (membar.scope == LocalScope::CTA) { + ir.WorkgroupMemoryBarrier(); + } else { + ir.DeviceMemoryBarrier(); + } } void TranslatorVisitor::DEPBAR() { |