diff options
| author | 2020-04-06 02:24:47 -0300 | |
|---|---|---|
| committer | 2020-04-06 02:24:47 -0300 | |
| commit | 3185245845f7487c3b832035b0c19fdc4f1a8262 (patch) | |
| tree | c002fb721c5db8fc5f035bbf218e423b8d982f85 /src/video_core/engines | |
| parent | shader/memory: Add "using std::move" (diff) | |
| download | yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.gz yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.tar.xz yuzu-3185245845f7487c3b832035b0c19fdc4f1a8262.zip | |
shader/memory: Implement RED.E.ADD
Implements a reduction operation. It's an atomic operation that doesn't
return a value.
This commit introduces another primitive because some shading languages
might have a primitive for reduction operations.
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 930b605af..a31947ef3 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -989,6 +989,12 @@ union Instruction { | |||
| 989 | } stg; | 989 | } stg; |
| 990 | 990 | ||
| 991 | union { | 991 | union { |
| 992 | BitField<23, 3, AtomicOp> operation; | ||
| 993 | BitField<48, 1, u64> extended; | ||
| 994 | BitField<20, 3, GlobalAtomicType> type; | ||
| 995 | } red; | ||
| 996 | |||
| 997 | union { | ||
| 992 | BitField<52, 4, AtomicOp> operation; | 998 | BitField<52, 4, AtomicOp> operation; |
| 993 | BitField<49, 3, GlobalAtomicType> type; | 999 | BitField<49, 3, GlobalAtomicType> type; |
| 994 | BitField<28, 20, s64> offset; | 1000 | BitField<28, 20, s64> offset; |
| @@ -1733,6 +1739,7 @@ public: | |||
| 1733 | ST_S, | 1739 | ST_S, |
| 1734 | ST, // Store in generic memory | 1740 | ST, // Store in generic memory |
| 1735 | STG, // Store in global memory | 1741 | STG, // Store in global memory |
| 1742 | RED, // Reduction operation | ||
| 1736 | ATOM, // Atomic operation on global memory | 1743 | ATOM, // Atomic operation on global memory |
| 1737 | ATOMS, // Atomic operation on shared memory | 1744 | ATOMS, // Atomic operation on shared memory |
| 1738 | AL2P, // Transforms attribute memory into physical memory | 1745 | AL2P, // Transforms attribute memory into physical memory |
| @@ -2039,6 +2046,7 @@ private: | |||
| 2039 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), | 2046 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), |
| 2040 | INST("101-------------", Id::ST, Type::Memory, "ST"), | 2047 | INST("101-------------", Id::ST, Type::Memory, "ST"), |
| 2041 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), | 2048 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), |
| 2049 | INST("1110101111111---", Id::RED, Type::Memory, "RED"), | ||
| 2042 | INST("11101101--------", Id::ATOM, Type::Memory, "ATOM"), | 2050 | INST("11101101--------", Id::ATOM, Type::Memory, "ATOM"), |
| 2043 | INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), | 2051 | INST("11101100--------", Id::ATOMS, Type::Memory, "ATOMS"), |
| 2044 | INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), | 2052 | INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), |