summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2019-09-14 00:45:51 -0400
committerGravatar GitHub2019-09-14 00:45:51 -0400
commit3cc27e4ddaf6a8c7449b2c2b7c8d9aa7fbf248ad (patch)
tree3e6e0e818e952a038fbe10262bf39cf6d52eaa61 /src/video_core/engines
parentMerge pull request #2823 from ReinUsesLisp/shr-clamp (diff)
parentshader/image: Implement SUATOM and fix SUST (diff)
downloadyuzu-3cc27e4ddaf6a8c7449b2c2b7c8d9aa7fbf248ad.tar.gz
yuzu-3cc27e4ddaf6a8c7449b2c2b7c8d9aa7fbf248ad.tar.xz
yuzu-3cc27e4ddaf6a8c7449b2c2b7c8d9aa7fbf248ad.zip
Merge pull request #2757 from ReinUsesLisp/suatom
shader/image: Implement SUATOM and fix SUST
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index bd8c1ada0..052e6d24e 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -544,6 +544,28 @@ enum class VoteOperation : u64 {
544 Eq = 2, // allThreadsEqualNV 544 Eq = 2, // allThreadsEqualNV
545}; 545};
546 546
547enum class ImageAtomicSize : u64 {
548 U32 = 0,
549 S32 = 1,
550 U64 = 2,
551 F32 = 3,
552 S64 = 5,
553 SD32 = 6,
554 SD64 = 7,
555};
556
557enum class ImageAtomicOperation : u64 {
558 Add = 0,
559 Min = 1,
560 Max = 2,
561 Inc = 3,
562 Dec = 4,
563 And = 5,
564 Or = 6,
565 Xor = 7,
566 Exch = 8,
567};
568
547union Instruction { 569union Instruction {
548 Instruction& operator=(const Instruction& instr) { 570 Instruction& operator=(const Instruction& instr) {
549 value = instr.value; 571 value = instr.value;
@@ -1392,6 +1414,14 @@ union Instruction {
1392 } sust; 1414 } sust;
1393 1415
1394 union { 1416 union {
1417 BitField<28, 1, u64> is_ba;
1418 BitField<51, 3, ImageAtomicSize> size;
1419 BitField<33, 3, ImageType> image_type;
1420 BitField<29, 4, ImageAtomicOperation> operation;
1421 BitField<49, 2, OutOfBoundsStore> out_of_bounds_store;
1422 } suatom_d;
1423
1424 union {
1395 BitField<20, 24, u64> target; 1425 BitField<20, 24, u64> target;
1396 BitField<5, 1, u64> constant_buffer; 1426 BitField<5, 1, u64> constant_buffer;
1397 1427
@@ -1543,6 +1573,7 @@ public:
1543 TMML_B, // Texture Mip Map Level 1573 TMML_B, // Texture Mip Map Level
1544 TMML, // Texture Mip Map Level 1574 TMML, // Texture Mip Map Level
1545 SUST, // Surface Store 1575 SUST, // Surface Store
1576 SUATOM, // Surface Atomic Operation
1546 EXIT, 1577 EXIT,
1547 NOP, 1578 NOP,
1548 IPA, 1579 IPA,
@@ -1826,6 +1857,7 @@ private:
1826 INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"), 1857 INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"),
1827 INST("1101111101011---", Id::TMML, Type::Texture, "TMML"), 1858 INST("1101111101011---", Id::TMML, Type::Texture, "TMML"),
1828 INST("11101011001-----", Id::SUST, Type::Image, "SUST"), 1859 INST("11101011001-----", Id::SUST, Type::Image, "SUST"),
1860 INST("1110101000------", Id::SUATOM, Type::Image, "SUATOM_D"),
1829 INST("0101000010110---", Id::NOP, Type::Trivial, "NOP"), 1861 INST("0101000010110---", Id::NOP, Type::Trivial, "NOP"),
1830 INST("11100000--------", Id::IPA, Type::Trivial, "IPA"), 1862 INST("11100000--------", Id::IPA, Type::Trivial, "IPA"),
1831 INST("1111101111100---", Id::OUT_R, Type::Trivial, "OUT_R"), 1863 INST("1111101111100---", Id::OUT_R, Type::Trivial, "OUT_R"),