summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
m---------externals/sirit0
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp14
2 files changed, 11 insertions, 3 deletions
diff --git a/externals/sirit b/externals/sirit
-Subproject 9f4d057aa28c4e9509bdc767afb27b4aee303b7
+Subproject a712959f1e373a33b48042b5934e288a243d595
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 0cf97cafa..dd6d2ef03 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -1796,9 +1796,17 @@ private:
return {};
}
- Expression UAtomicAdd(Operation) {
- UNIMPLEMENTED();
- return {};
+ Expression UAtomicAdd(Operation operation) {
+ const auto& smem = std::get<SmemNode>(*operation[0]);
+ Id address = AsUint(Visit(smem.GetAddress()));
+ address = OpShiftRightLogical(t_uint, address, Constant(t_uint, 2U));
+ const Id pointer = OpAccessChain(t_smem_uint, shared_memory, address);
+
+ const Id scope = Constant(t_uint, static_cast<u32>(spv::Scope::Device));
+ const Id semantics = Constant(t_uint, 0U);
+
+ const Id value = AsUint(Visit(operation[1]));
+ return {OpAtomicIAdd(t_uint, pointer, scope, semantics, value), Type::Uint};
}
Expression Branch(Operation operation) {