summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-10-22 16:59:07 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-10-22 16:59:07 +0200
commit1509d2ffbdf98ead108d672795b2e9a7a93f4ce6 (patch)
tree45bc3b8537dbde097a34e74bf802a84317dfb1c6
parentMerge pull request #3003 from ReinUsesLisp/flush-mme-trace (diff)
downloadyuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar.gz
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar.bz2
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar.lz
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar.xz
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.tar.zst
yuzu-1509d2ffbdf98ead108d672795b2e9a7a93f4ce6.zip
-rw-r--r--src/video_core/shader/decode/texture.cpp8
-rw-r--r--src/video_core/shader/shader_ir.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp
index 0b934a069..295445498 100644
--- a/src/video_core/shader/decode/texture.cpp
+++ b/src/video_core/shader/decode/texture.cpp
@@ -150,7 +150,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) {
values[element] = Operation(OperationCode::TextureGather, meta, std::move(coords_copy));
}
- WriteTexsInstructionFloat(bb, instr, values);
+ WriteTexsInstructionFloat(bb, instr, values, true);
break;
}
case OpCode::Id::TXQ_B:
@@ -344,14 +344,14 @@ void ShaderIR::WriteTexInstructionFloat(NodeBlock& bb, Instruction instr, const
}
}
-void ShaderIR::WriteTexsInstructionFloat(NodeBlock& bb, Instruction instr,
- const Node4& components) {
+void ShaderIR::WriteTexsInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components,
+ bool ignore_mask) {
// TEXS has two destination registers and a swizzle. The first two elements in the swizzle
// go into gpr0+0 and gpr0+1, and the rest goes into gpr28+0 and gpr28+1
u32 dest_elem = 0;
for (u32 component = 0; component < 4; ++component) {
- if (!instr.texs.IsComponentEnabled(component))
+ if (!instr.texs.IsComponentEnabled(component) && !ignore_mask)
continue;
SetTemporary(bb, dest_elem++, components[component]);
}
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h
index 105981d67..df64845f5 100644
--- a/src/video_core/shader/shader_ir.h
+++ b/src/video_core/shader/shader_ir.h
@@ -322,7 +322,7 @@ private:
const Node4& components);
void WriteTexsInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
- const Node4& components);
+ const Node4& components, bool ignore_mask = false);
void WriteTexsInstructionHalfFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
const Node4& components);