diff options
| author | 2020-01-29 16:49:54 -0500 | |
|---|---|---|
| committer | 2020-01-29 16:49:54 -0500 | |
| commit | 2db7adc42a3d72fe7b02fbf4902b98d69c777b2f (patch) | |
| tree | 197f2b968aa80756e329d9c76cfe72575e2f2ac5 /src/video_core/engines | |
| parent | Merge pull request #3355 from ReinUsesLisp/break-down (diff) | |
| parent | shader/memory: Implement ATOM.ADD (diff) | |
| download | yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.gz yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.tar.xz yuzu-2db7adc42a3d72fe7b02fbf4902b98d69c777b2f.zip | |
Merge pull request #3350 from ReinUsesLisp/atom
shader/memory: Implement ATOM.ADD
Diffstat (limited to 'src/video_core/engines')
| -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 { | |||
| 227 | Exch = 8, | 227 | Exch = 8, |
| 228 | }; | 228 | }; |
| 229 | 229 | ||
| 230 | enum class GlobalAtomicOp : u64 { | ||
| 231 | Add = 0, | ||
| 232 | Min = 1, | ||
| 233 | Max = 2, | ||
| 234 | Inc = 3, | ||
| 235 | Dec = 4, | ||
| 236 | And = 5, | ||
| 237 | Or = 6, | ||
| 238 | Xor = 7, | ||
| 239 | Exch = 8, | ||
| 240 | SafeAdd = 10, | ||
| 241 | }; | ||
| 242 | |||
| 243 | enum class GlobalAtomicType : u64 { | ||
| 244 | U32 = 0, | ||
| 245 | S32 = 1, | ||
| 246 | U64 = 2, | ||
| 247 | F32_FTZ_RN = 3, | ||
| 248 | F16x2_FTZ_RN = 4, | ||
| 249 | S64 = 5, | ||
| 250 | }; | ||
| 251 | |||
| 230 | enum class UniformType : u64 { | 252 | enum class UniformType : u64 { |
| 231 | UnsignedByte = 0, | 253 | UnsignedByte = 0, |
| 232 | SignedByte = 1, | 254 | SignedByte = 1, |
| @@ -958,6 +980,12 @@ union Instruction { | |||
| 958 | } stg; | 980 | } stg; |
| 959 | 981 | ||
| 960 | union { | 982 | union { |
| 983 | BitField<52, 4, GlobalAtomicOp> operation; | ||
| 984 | BitField<49, 3, GlobalAtomicType> type; | ||
| 985 | BitField<28, 20, s64> offset; | ||
| 986 | } atom; | ||
| 987 | |||
| 988 | union { | ||
| 961 | BitField<52, 4, AtomicOp> operation; | 989 | BitField<52, 4, AtomicOp> operation; |
| 962 | BitField<28, 2, AtomicType> type; | 990 | BitField<28, 2, AtomicType> type; |
| 963 | BitField<30, 22, s64> offset; | 991 | BitField<30, 22, s64> offset; |
| @@ -1690,6 +1718,7 @@ public: | |||
| 1690 | ST_S, | 1718 | ST_S, |
| 1691 | ST, // Store in generic memory | 1719 | ST, // Store in generic memory |
| 1692 | STG, // Store in global memory | 1720 | STG, // Store in global memory |
| 1721 | ATOM, // Atomic operation on global memory | ||
| 1693 | ATOMS, // Atomic operation on shared memory | 1722 | ATOMS, // Atomic operation on shared memory |
| 1694 | AL2P, // Transforms attribute memory into physical memory | 1723 | AL2P, // Transforms attribute memory into physical memory |
| 1695 | TEX, | 1724 | TEX, |
| @@ -1994,6 +2023,7 @@ private: | |||
| 1994 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), | 2023 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), |
| 1995 | INST("101-------------", Id::ST, Type::Memory, "ST"), | 2024 | INST("101-------------", Id::ST, Type::Memory, "ST"), |
| 1996 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), | 2025 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), |
| 2026 | INST("11101101--------", Id::ATOM, Type::Memory, "ATOM"), | ||
| 1997 | INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), | 2027 | INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), |
| 1998 | INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), | 2028 | INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), |
| 1999 | INST("110000----111---", Id::TEX, Type::Texture, "TEX"), | 2029 | INST("110000----111---", Id::TEX, Type::Texture, "TEX"), |