diff options
| author | 2019-04-29 23:27:15 -0300 | |
|---|---|---|
| committer | 2019-05-02 21:46:25 -0300 | |
| commit | 7632a7d6d2cd1fca58dcc714fccac01ec2753547 (patch) | |
| tree | 8cf5178a20acc61c940d975f10a249fcb2f1f98c /src | |
| parent | loader/nso: Remove left-in debug pragma (diff) | |
| download | yuzu-7632a7d6d2cd1fca58dcc714fccac01ec2753547.tar.gz yuzu-7632a7d6d2cd1fca58dcc714fccac01ec2753547.tar.xz yuzu-7632a7d6d2cd1fca58dcc714fccac01ec2753547.zip | |
shader_bytecode: Add AL2P decoding
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index e5b4eadea..766bb4f79 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -499,6 +499,11 @@ enum class SystemVariable : u64 { | |||
| 499 | CircularQueueEntryAddressHigh = 0x63, | 499 | CircularQueueEntryAddressHigh = 0x63, |
| 500 | }; | 500 | }; |
| 501 | 501 | ||
| 502 | enum class PhysicalAttributeDirection : u64 { | ||
| 503 | Input = 0, | ||
| 504 | Output = 1, | ||
| 505 | }; | ||
| 506 | |||
| 502 | union Instruction { | 507 | union Instruction { |
| 503 | Instruction& operator=(const Instruction& instr) { | 508 | Instruction& operator=(const Instruction& instr) { |
| 504 | value = instr.value; | 509 | value = instr.value; |
| @@ -812,6 +817,12 @@ union Instruction { | |||
| 812 | } stg; | 817 | } stg; |
| 813 | 818 | ||
| 814 | union { | 819 | union { |
| 820 | BitField<32, 1, PhysicalAttributeDirection> direction; | ||
| 821 | BitField<47, 3, AttributeSize> size; | ||
| 822 | BitField<20, 11, u64> address; | ||
| 823 | } al2p; | ||
| 824 | |||
| 825 | union { | ||
| 815 | BitField<0, 3, u64> pred0; | 826 | BitField<0, 3, u64> pred0; |
| 816 | BitField<3, 3, u64> pred3; | 827 | BitField<3, 3, u64> pred3; |
| 817 | BitField<7, 1, u64> abs_a; | 828 | BitField<7, 1, u64> abs_a; |
| @@ -1374,8 +1385,9 @@ public: | |||
| 1374 | ST_A, | 1385 | ST_A, |
| 1375 | ST_L, | 1386 | ST_L, |
| 1376 | ST_S, | 1387 | ST_S, |
| 1377 | LDG, // Load from global memory | 1388 | LDG, // Load from global memory |
| 1378 | STG, // Store in global memory | 1389 | STG, // Store in global memory |
| 1390 | AL2P, // Transforms attribute memory into physical memory | ||
| 1379 | TEX, | 1391 | TEX, |
| 1380 | TEX_B, // Texture Load Bindless | 1392 | TEX_B, // Texture Load Bindless |
| 1381 | TXQ, // Texture Query | 1393 | TXQ, // Texture Query |
| @@ -1646,6 +1658,7 @@ private: | |||
| 1646 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), | 1658 | INST("1110111101010---", Id::ST_L, Type::Memory, "ST_L"), |
| 1647 | INST("1110111011010---", Id::LDG, Type::Memory, "LDG"), | 1659 | INST("1110111011010---", Id::LDG, Type::Memory, "LDG"), |
| 1648 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), | 1660 | INST("1110111011011---", Id::STG, Type::Memory, "STG"), |
| 1661 | INST("1110111110100---", Id::AL2P, Type::Memory, "AL2P"), | ||
| 1649 | INST("110000----111---", Id::TEX, Type::Texture, "TEX"), | 1662 | INST("110000----111---", Id::TEX, Type::Texture, "TEX"), |
| 1650 | INST("1101111010111---", Id::TEX_B, Type::Texture, "TEX_B"), | 1663 | INST("1101111010111---", Id::TEX_B, Type::Texture, "TEX_B"), |
| 1651 | INST("1101111101001---", Id::TXQ, Type::Texture, "TXQ"), | 1664 | INST("1101111101001---", Id::TXQ, Type::Texture, "TXQ"), |