summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-14 14:44:38 +0200
committerGitHub <noreply@github.com>2019-07-14 14:44:38 +0200
commit0ec9da2f9f610c7ac733269e554b40f28aa97a11 (patch)
treeb78676331a8cc7fc1db7d1ed5139ec0f167b67a3 /src
parentMerge pull request #2730 from DarkLordZach/master (diff)
parentshader/texture: Add F16 support for TLDS (diff)
downloadyuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar.gz
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar.bz2
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar.lz
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar.xz
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.tar.zst
yuzu-0ec9da2f9f610c7ac733269e554b40f28aa97a11.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/shader_bytecode.h3
-rw-r--r--src/video_core/shader/decode/texture.cpp8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index c3055602b..4aaad2979 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -1278,6 +1278,7 @@ union Instruction {
union {
BitField<49, 1, u64> nodep_flag;
BitField<53, 4, u64> texture_info;
+ BitField<59, 1, u64> fp32_flag;
TextureType GetTextureType() const {
// The TLDS instruction has a weird encoding for the texture type.
@@ -1776,7 +1777,7 @@ private:
INST("1101111101010---", Id::TXQ_B, Type::Texture, "TXQ_B"),
INST("1101-00---------", Id::TEXS, Type::Texture, "TEXS"),
INST("11011100--11----", Id::TLD, Type::Texture, "TLD"),
- INST("1101101---------", Id::TLDS, Type::Texture, "TLDS"),
+ INST("1101-01---------", Id::TLDS, Type::Texture, "TLDS"),
INST("110010----111---", Id::TLD4, Type::Texture, "TLD4"),
INST("1101111100------", Id::TLD4S, Type::Texture, "TLD4S"),
INST("110111110110----", Id::TMML_B, Type::Texture, "TMML_B"),
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp
index cb480be9b..323be3f14 100644
--- a/src/video_core/shader/decode/texture.cpp
+++ b/src/video_core/shader/decode/texture.cpp
@@ -269,7 +269,13 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) {
LOG_WARNING(HW_GPU, "TLDS.NODEP implementation is incomplete");
}
- WriteTexsInstructionFloat(bb, instr, GetTldsCode(instr, texture_type, is_array));
+ const Node4 components = GetTldsCode(instr, texture_type, is_array);
+
+ if (instr.tlds.fp32_flag) {
+ WriteTexsInstructionFloat(bb, instr, components);
+ } else {
+ WriteTexsInstructionHalfFloat(bb, instr, components);
+ }
break;
}
default: