diff options
| author | 2019-10-30 18:37:17 +0000 | |
|---|---|---|
| committer | 2019-10-30 18:37:17 +0000 | |
| commit | 658489ebf71ea7c66fda338072e38bb71deffb3b (patch) | |
| tree | f66de374ab21111f7c62b2eeac03d4cb4a4190bc /src/video_core/engines | |
| parent | Merge pull request #3038 from lioncash/docs (diff) | |
| parent | Shader_IR: Fix TLD4 and add Bindless Variant. (diff) | |
| download | yuzu-658489ebf71ea7c66fda338072e38bb71deffb3b.tar.gz yuzu-658489ebf71ea7c66fda338072e38bb71deffb3b.tar.xz yuzu-658489ebf71ea7c66fda338072e38bb71deffb3b.zip | |
Merge pull request #3050 from FernandoS27/fix-tld4
shader_ir: Fix TLD4 and add bindless variant
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index d3d05a866..8f6bc76eb 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -1238,6 +1238,32 @@ union Instruction { | |||
| 1238 | } tld4; | 1238 | } tld4; |
| 1239 | 1239 | ||
| 1240 | union { | 1240 | union { |
| 1241 | BitField<35, 1, u64> ndv_flag; | ||
| 1242 | BitField<49, 1, u64> nodep_flag; | ||
| 1243 | BitField<50, 1, u64> dc_flag; | ||
| 1244 | BitField<33, 2, u64> info; | ||
| 1245 | BitField<37, 2, u64> component; | ||
| 1246 | |||
| 1247 | bool UsesMiscMode(TextureMiscMode mode) const { | ||
| 1248 | switch (mode) { | ||
| 1249 | case TextureMiscMode::NDV: | ||
| 1250 | return ndv_flag != 0; | ||
| 1251 | case TextureMiscMode::NODEP: | ||
| 1252 | return nodep_flag != 0; | ||
| 1253 | case TextureMiscMode::DC: | ||
| 1254 | return dc_flag != 0; | ||
| 1255 | case TextureMiscMode::AOFFI: | ||
| 1256 | return info == 1; | ||
| 1257 | case TextureMiscMode::PTP: | ||
| 1258 | return info == 2; | ||
| 1259 | default: | ||
| 1260 | break; | ||
| 1261 | } | ||
| 1262 | return false; | ||
| 1263 | } | ||
| 1264 | } tld4_b; | ||
| 1265 | |||
| 1266 | union { | ||
| 1241 | BitField<49, 1, u64> nodep_flag; | 1267 | BitField<49, 1, u64> nodep_flag; |
| 1242 | BitField<50, 1, u64> dc_flag; | 1268 | BitField<50, 1, u64> dc_flag; |
| 1243 | BitField<51, 1, u64> aoffi_flag; | 1269 | BitField<51, 1, u64> aoffi_flag; |
| @@ -1590,7 +1616,8 @@ public: | |||
| 1590 | TEXS, // Texture Fetch with scalar/non-vec4 source/destinations | 1616 | TEXS, // Texture Fetch with scalar/non-vec4 source/destinations |
| 1591 | TLD, // Texture Load | 1617 | TLD, // Texture Load |
| 1592 | TLDS, // Texture Load with scalar/non-vec4 source/destinations | 1618 | TLDS, // Texture Load with scalar/non-vec4 source/destinations |
| 1593 | TLD4, // Texture Load 4 | 1619 | TLD4, // Texture Gather 4 |
| 1620 | TLD4_B, // Texture Gather 4 Bindless | ||
| 1594 | TLD4S, // Texture Load 4 with scalar / non - vec4 source / destinations | 1621 | TLD4S, // Texture Load 4 with scalar / non - vec4 source / destinations |
| 1595 | TMML_B, // Texture Mip Map Level | 1622 | TMML_B, // Texture Mip Map Level |
| 1596 | TMML, // Texture Mip Map Level | 1623 | TMML, // Texture Mip Map Level |
| @@ -1881,6 +1908,7 @@ private: | |||
| 1881 | INST("11011100--11----", Id::TLD, Type::Texture, "TLD"), | 1908 | INST("11011100--11----", Id::TLD, Type::Texture, "TLD"), |
| 1882 | INST("1101-01---------", Id::TLDS, Type::Texture, "TLDS"), | 1909 | INST("1101-01---------", Id::TLDS, Type::Texture, "TLDS"), |
| 1883 | INST("110010----111---", Id::TLD4, Type::Texture, "TLD4"), | 1910 | INST("110010----111---", Id::TLD4, Type::Texture, "TLD4"), |
| 1911 | INST("1101111011111---", Id::TLD4_B, Type::Texture, "TLD4_B"), | ||
| 1884 | INST("1101111100------", Id::TLD4S, Type::Texture, "TLD4S"), | 1912 | INST("1101111100------", Id::TLD4S, Type::Texture, "TLD4S"), |
| 1885 | INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"), | 1913 | INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"), |
| 1886 | INST("1101111101011---", Id::TMML, Type::Texture, "TMML"), | 1914 | INST("1101111101011---", Id::TMML, Type::Texture, "TMML"), |