summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-01-19 20:37:39 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-01-19 20:40:31 +0100
commitb2c976ad0e5dbbcae16c419628c144a7f28e0d17 (patch)
tree3a6d9f254c6ad48a4466b99634562df1ad0c2678
parentMerge pull request #3317 from ReinUsesLisp/gl-decomp-cc-decomp (diff)
downloadyuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar.gz
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar.bz2
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar.lz
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar.xz
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.tar.zst
yuzu-b2c976ad0e5dbbcae16c419628c144a7f28e0d17.zip
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) {