summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2018-09-09 21:39:39 -0400
committerGravatar GitHub2018-09-09 21:39:39 -0400
commite58855c7a4596f8a2a69adfb1e4c3464a15f03a2 (patch)
treef10985b77f34a6d907bde37122d0d6353ba17091 /src/video_core/engines
parentMerge pull request #1272 from Subv/dma_2d (diff)
parentImplemented TMML (diff)
downloadyuzu-e58855c7a4596f8a2a69adfb1e4c3464a15f03a2.tar.gz
yuzu-e58855c7a4596f8a2a69adfb1e4c3464a15f03a2.tar.xz
yuzu-e58855c7a4596f8a2a69adfb1e4c3464a15f03a2.zip
Merge pull request #1268 from FernandoS27/tmml
shader_decompiler: Implemented TMML
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 6cfdb6e27..9176a8dbc 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -536,6 +536,16 @@ union Instruction {
536 union { 536 union {
537 BitField<28, 1, u64> array; 537 BitField<28, 1, u64> array;
538 BitField<29, 2, TextureType> texture_type; 538 BitField<29, 2, TextureType> texture_type;
539 BitField<31, 4, u64> component_mask;
540
541 bool IsComponentEnabled(size_t component) const {
542 return ((1ull << component) & component_mask) != 0;
543 }
544 } tmml;
545
546 union {
547 BitField<28, 1, u64> array;
548 BitField<29, 2, TextureType> texture_type;
539 BitField<56, 2, u64> component; 549 BitField<56, 2, u64> component;
540 } tld4; 550 } tld4;
541 551
@@ -685,11 +695,13 @@ public:
685 LDG, // Load from global memory 695 LDG, // Load from global memory
686 STG, // Store in global memory 696 STG, // Store in global memory
687 TEX, 697 TEX,
688 TXQ, // Texture Query 698 TXQ, // Texture Query
689 TEXS, // Texture Fetch with scalar/non-vec4 source/destinations 699 TEXS, // Texture Fetch with scalar/non-vec4 source/destinations
690 TLDS, // Texture Load with scalar/non-vec4 source/destinations 700 TLDS, // Texture Load with scalar/non-vec4 source/destinations
691 TLD4, // Texture Load 4 701 TLD4, // Texture Load 4
692 TLD4S, // Texture Load 4 with scalar / non - vec4 source / destinations 702 TLD4S, // Texture Load 4 with scalar / non - vec4 source / destinations
703 TMML_B, // Texture Mip Map Level
704 TMML, // Texture Mip Map Level
693 EXIT, 705 EXIT,
694 IPA, 706 IPA,
695 FFMA_IMM, // Fused Multiply and Add 707 FFMA_IMM, // Fused Multiply and Add
@@ -914,6 +926,8 @@ private:
914 INST("1101101---------", Id::TLDS, Type::Memory, "TLDS"), 926 INST("1101101---------", Id::TLDS, Type::Memory, "TLDS"),
915 INST("110010----111---", Id::TLD4, Type::Memory, "TLD4"), 927 INST("110010----111---", Id::TLD4, Type::Memory, "TLD4"),
916 INST("1101111100------", Id::TLD4S, Type::Memory, "TLD4S"), 928 INST("1101111100------", Id::TLD4S, Type::Memory, "TLD4S"),
929 INST("110111110110----", Id::TMML_B, Type::Memory, "TMML_B"),
930 INST("1101111101011---", Id::TMML, Type::Memory, "TMML"),
917 INST("111000110000----", Id::EXIT, Type::Trivial, "EXIT"), 931 INST("111000110000----", Id::EXIT, Type::Trivial, "EXIT"),
918 INST("11100000--------", Id::IPA, Type::Trivial, "IPA"), 932 INST("11100000--------", Id::IPA, Type::Trivial, "IPA"),
919 INST("0011001-1-------", Id::FFMA_IMM, Type::Ffma, "FFMA_IMM"), 933 INST("0011001-1-------", Id::FFMA_IMM, Type::Ffma, "FFMA_IMM"),