1
0
Fork 0
forked from suyu/suyu

gl_shader_decompiler: Remove texture temporal in TLD4

This commit is contained in:
ReinUsesLisp 2018-11-28 22:07:19 -03:00
parent 8d58e5da71
commit eb700afcf0

View file

@ -2972,15 +2972,13 @@ private:
if (depth_compare) { if (depth_compare) {
regs.SetRegisterToFloat(instr.gpr0, 0, texture, 1, 1, false); regs.SetRegisterToFloat(instr.gpr0, 0, texture, 1, 1, false);
} else { } else {
shader.AddLine("vec4 texture_tmp = " + texture + ';');
std::size_t dest_elem{}; std::size_t dest_elem{};
for (std::size_t elem = 0; elem < 4; ++elem) { for (std::size_t elem = 0; elem < 4; ++elem) {
if (!instr.tex.IsComponentEnabled(elem)) { if (!instr.tex.IsComponentEnabled(elem)) {
// Skip disabled components // Skip disabled components
continue; continue;
} }
regs.SetRegisterToFloat(instr.gpr0, elem, "texture_tmp", 1, 4, false, regs.SetRegisterToFloat(instr.gpr0, elem, texture, 1, 4, false, dest_elem);
dest_elem);
++dest_elem; ++dest_elem;
} }
} }