diff options
author | bunnei <bunneidev@gmail.com> | 2020-01-29 22:49:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 22:49:54 +0100 |
commit | 2db7adc42a3d72fe7b02fbf4902b98d69c777b2f (patch) | |
tree | 197f2b968aa80756e329d9c76cfe72575e2f2ac5 /src/video_core/engines/shader_bytecode.h | |
parent | Merge pull request #3355 from ReinUsesLisp/break-down (diff) | |
parent | shader/memory: Implement ATOM.ADD (diff) | |
download | yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.gz yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.bz2 yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.lz yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.xz yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.zst yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.zip |
Diffstat (limited to 'src/video_core/engines/shader_bytecode.h')
-rw-r--r-- | src/video_core/engines/shader_bytecode.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 6f98bd827..f443ec0fe 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -227,6 +227,28 @@ enum class AtomicOp : u64 { Exch = 8, }; +enum class GlobalAtomicOp : u64 { + Add = 0, + Min = 1, + Max = 2, + Inc = 3, + Dec = 4, + And = 5, + Or = 6, + Xor = 7, + Exch = 8, + SafeAdd = 10, +}; + +enum class GlobalAtomicType : u64 { + U32 = 0, + S32 = 1, + U64 = 2, + F32_FTZ_RN = 3, + F16x2_FTZ_RN = 4, + S64 = 5, +}; + enum class UniformType : u64 { UnsignedByte = 0, SignedByte = 1, @@ -958,6 +980,12 @@ union Instruction { } stg; union { + BitField<52, 4, GlobalAtomicOp> operation; + BitField<49, 3, GlobalAtomicType> type; + BitField<28, 20, s64> offset; + } atom; + + union { BitField<52, 4, AtomicOp> operation; BitField<28, 2, AtomicType> type; BitField<30, 22, s64> offset; @@ -1690,6 +1718,7 @@ public: ST_S, ST, // Store in generic memory STG, // Store in global memory + ATOM, // Atomic operation on global memory ATOMS, // Atomic operation on shared memory AL2P, // Transforms attribute memory into physical memory TEX, @@ -1994,6 +2023,7 @@ private: INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), INST("101-------------", Id::ST, Type::Memory, "ST"), INST("1110111011011---", Id::STG, Type::Memory, "STG"), + INST("11101101--------", Id::ATOM, Type::Memory, "ATOM"), INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), INST("110000----111---", Id::TEX, Type::Texture, "TEX"), |