mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-30 15:44:14 +01:00
Shader_IR: Fix regression on TLD4
Originally on the last commit I thought TLD4 acted the same as TLD4S and didn't have a mask. It actually does have a component mask. This commit corrects that.
This commit is contained in:
parent
658489ebf7
commit
23cabc98db
@ -119,7 +119,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) {
|
|||||||
: instr.tld4.UsesMiscMode(TextureMiscMode::AOFFI);
|
: instr.tld4.UsesMiscMode(TextureMiscMode::AOFFI);
|
||||||
WriteTexInstructionFloat(
|
WriteTexInstructionFloat(
|
||||||
bb, instr,
|
bb, instr,
|
||||||
GetTld4Code(instr, texture_type, depth_compare, is_array, is_aoffi, is_bindless), true);
|
GetTld4Code(instr, texture_type, depth_compare, is_array, is_aoffi, is_bindless));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::TLD4S: {
|
case OpCode::Id::TLD4S: {
|
||||||
@ -366,11 +366,10 @@ const Sampler& ShaderIR::GetBindlessSampler(const Tegra::Shader::Register& reg,
|
|||||||
return *used_samplers.emplace(entry).first;
|
return *used_samplers.emplace(entry).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderIR::WriteTexInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components,
|
void ShaderIR::WriteTexInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components) {
|
||||||
bool is_tld4) {
|
|
||||||
u32 dest_elem = 0;
|
u32 dest_elem = 0;
|
||||||
for (u32 elem = 0; elem < 4; ++elem) {
|
for (u32 elem = 0; elem < 4; ++elem) {
|
||||||
if (!is_tld4 && !instr.tex.IsComponentEnabled(elem)) {
|
if (!instr.tex.IsComponentEnabled(elem)) {
|
||||||
// Skip disabled components
|
// Skip disabled components
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,7 @@ private:
|
|||||||
Node BitfieldInsert(Node base, Node insert, u32 offset, u32 bits);
|
Node BitfieldInsert(Node base, Node insert, u32 offset, u32 bits);
|
||||||
|
|
||||||
void WriteTexInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
void WriteTexInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
||||||
const Node4& components, bool is_tld4 = false);
|
const Node4& components);
|
||||||
|
|
||||||
void WriteTexsInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
void WriteTexsInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr,
|
||||||
const Node4& components, bool ignore_mask = false);
|
const Node4& components, bool ignore_mask = false);
|
||||||
|
Loading…
Reference in New Issue
Block a user