diff options
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: | |||
| 1971 | return {OpSubgroupReadInvocationKHR(t_float, value, index), Type::Float}; | 1971 | return {OpSubgroupReadInvocationKHR(t_float, value, index), Type::Float}; |
| 1972 | } | 1972 | } |
| 1973 | 1973 | ||
| 1974 | Expression MemoryBarrierGL(Operation) { | ||
| 1975 | const auto scope = spv::Scope::Device; | ||
| 1976 | const auto semantics = | ||
| 1977 | spv::MemorySemanticsMask::AcquireRelease | spv::MemorySemanticsMask::UniformMemory | | ||
| 1978 | spv::MemorySemanticsMask::WorkgroupMemory | | ||
| 1979 | spv::MemorySemanticsMask::AtomicCounterMemory | spv::MemorySemanticsMask::ImageMemory; | ||
| 1980 | |||
| 1981 | OpMemoryBarrier(Constant(t_uint, static_cast<u32>(scope)), | ||
| 1982 | Constant(t_uint, static_cast<u32>(semantics))); | ||
| 1983 | return {}; | ||
| 1984 | } | ||
| 1985 | |||
| 1974 | Id DeclareBuiltIn(spv::BuiltIn builtin, spv::StorageClass storage, Id type, std::string name) { | 1986 | Id DeclareBuiltIn(spv::BuiltIn builtin, spv::StorageClass storage, Id type, std::string name) { |
| 1975 | const Id id = OpVariable(type, storage); | 1987 | const Id id = OpVariable(type, storage); |
| 1976 | Decorate(id, spv::Decoration::BuiltIn, static_cast<u32>(builtin)); | 1988 | Decorate(id, spv::Decoration::BuiltIn, static_cast<u32>(builtin)); |
| @@ -2374,6 +2386,8 @@ private: | |||
| 2374 | 2386 | ||
| 2375 | &SPIRVDecompiler::ThreadId, | 2387 | &SPIRVDecompiler::ThreadId, |
| 2376 | &SPIRVDecompiler::ShuffleIndexed, | 2388 | &SPIRVDecompiler::ShuffleIndexed, |
| 2389 | |||
| 2390 | &SPIRVDecompiler::MemoryBarrierGL, | ||
| 2377 | }; | 2391 | }; |
| 2378 | static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount)); | 2392 | static_assert(operation_decompilers.size() == static_cast<std::size_t>(OperationCode::Amount)); |
| 2379 | 2393 | ||