summaryrefslogtreecommitdiff
path: root/src/video_core/shader/node.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-01-25 21:03:02 -0300
committerGravatar ReinUsesLisp2020-01-26 01:54:24 -0300
commitd95d4ac84396973d76985dc96249d4714f58b6a2 (patch)
tree63083efff309ea993e1de84e4b93fd6d348dfce2 /src/video_core/shader/node.h
parentMerge pull request #3343 from FearlessTobi/ui-tab (diff)
downloadyuzu-d95d4ac84396973d76985dc96249d4714f58b6a2.tar.gz
yuzu-d95d4ac84396973d76985dc96249d4714f58b6a2.tar.xz
yuzu-d95d4ac84396973d76985dc96249d4714f58b6a2.zip
shader/memory: Implement ATOM.ADD
ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition.
Diffstat (limited to 'src/video_core/shader/node.h')
-rw-r--r--src/video_core/shader/node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/shader/node.h b/src/video_core/shader/node.h
index 075c7d07c..9af1f0228 100644
--- a/src/video_core/shader/node.h
+++ b/src/video_core/shader/node.h
@@ -162,7 +162,7 @@ enum class OperationCode {
162 AtomicImageXor, /// (MetaImage, int[N] coords) -> void 162 AtomicImageXor, /// (MetaImage, int[N] coords) -> void
163 AtomicImageExchange, /// (MetaImage, int[N] coords) -> void 163 AtomicImageExchange, /// (MetaImage, int[N] coords) -> void
164 164
165 UAtomicAdd, /// (smem, uint) -> uint 165 AtomicAdd, /// (memory, {u}int) -> {u}int
166 166
167 Branch, /// (uint branch_target) -> void 167 Branch, /// (uint branch_target) -> void
168 BranchIndirect, /// (uint branch_target) -> void 168 BranchIndirect, /// (uint branch_target) -> void