diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-15 07:24:42 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-22 04:20:43 +0200 |
commit | 5d0986a53be495f2a2158968db1bc0974f0dd0d3 (patch) | |
tree | 76b89957701a3e8cec21211b0090f8517b9338af /src/video_core/renderer_vulkan | |
parent | Merge pull request #3926 from ogniK5377/keyboard-states (diff) | |
download | yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar.gz yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar.bz2 yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar.lz yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar.xz yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.tar.zst yuzu-5d0986a53be495f2a2158968db1bc0974f0dd0d3.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 167e20e91..78963901c 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -2181,6 +2181,22 @@ private: return {OpSubgroupReadInvocationKHR(t_float, value, index), Type::Float}; } + Expression Barrier(Operation) { + if (!ir.IsDecompiled()) { + LOG_ERROR(Render_Vulkan, "OpBarrier used by shader is not decompiled"); + return {}; + } + + const auto scope = spv::Scope::Workgroup; + const auto memory = spv::Scope::Workgroup; + const auto semantics = + spv::MemorySemanticsMask::WorkgroupMemory | spv::MemorySemanticsMask::AcquireRelease; + OpControlBarrier(Constant(t_uint, static_cast<u32>(scope)), + Constant(t_uint, static_cast<u32>(memory)), + Constant(t_uint, static_cast<u32>(semantics))); + return {}; + } + Expression MemoryBarrierGL(Operation) { const auto scope = spv::Scope::Device; const auto semantics = @@ -2641,6 +2657,7 @@ private: &SPIRVDecompiler::ThreadId, &SPIRVDecompiler::ShuffleIndexed, + &SPIRVDecompiler::Barrier, &SPIRVDecompiler::MemoryBarrierGL, }; static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount)); |