diff options
author | bunnei <bunneidev@gmail.com> | 2019-12-11 20:24:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 20:24:39 +0100 |
commit | 1a66cde1753f4f0349989f3b9093b359e3e07136 (patch) | |
tree | 47aa17b54178b1aa150962401903d5a7dd659f83 /src/video_core/renderer_vulkan | |
parent | Kernel: Correct behavior of Address Arbiter threads. (#3165) (diff) | |
parent | shader: Implement MEMBAR.GL (diff) | |
download | yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar.gz yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar.bz2 yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar.lz yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar.xz yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.tar.zst yuzu-1a66cde1753f4f0349989f3b9093b359e3e07136.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 14 |
1 files changed, 14 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 8ad89b58a..6227bc70b 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -1971,6 +1971,18 @@ private: return {OpSubgroupReadInvocationKHR(t_float, value, index), Type::Float}; } + Expression MemoryBarrierGL(Operation) { + const auto scope = spv::Scope::Device; + const auto semantics = + spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory | + spv::MemorySemanticsMask::WorkgroupMemory | + spv::MemorySemanticsMask::AtomicCounterMemory | spv::MemorySemanticsMask::ImageMemory; + + OpMemoryBarrier(Constant(t_uint, static_cast<u32>(scope)), + Constant(t_uint, static_cast<u32>(semantics))); + return {}; + } + Id DeclareBuiltIn(spv::BuiltIn builtin, spv::StorageClass storage, Id type, std::string name) { const Id id = OpVariable(type, storage); Decorate(id, spv::Decoration::BuiltIn, static_cast<u32>(builtin)); @@ -2374,6 +2386,8 @@ private: &SPIRVDecompiler::ThreadId, &SPIRVDecompiler::ShuffleIndexed, + + &SPIRVDecompiler::MemoryBarrierGL, }; static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount)); |