mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-28 15:03:07 +00:00
gl_shader_decompiler: Flip negated if else statement
This commit is contained in:
parent
f4abebd731
commit
8d58e5da71
|
@ -3003,12 +3003,12 @@ private:
|
||||||
// TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction.
|
// TODO(Subv): Figure out how the sampler type is encoded in the TLD4S instruction.
|
||||||
const std::string sampler = GetSampler(
|
const std::string sampler = GetSampler(
|
||||||
instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare);
|
instr.sampler, Tegra::Shader::TextureType::Texture2D, false, depth_compare);
|
||||||
if (!depth_compare) {
|
if (depth_compare) {
|
||||||
shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");");
|
|
||||||
} else {
|
|
||||||
// Note: TLD4S coordinate encoding works just like TEXS's
|
// Note: TLD4S coordinate encoding works just like TEXS's
|
||||||
const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
|
const std::string op_y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
|
||||||
shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");");
|
shader.AddLine("vec3 coords = vec3(" + op_a + ", " + op_y + ", " + op_b + ");");
|
||||||
|
} else {
|
||||||
|
shader.AddLine("vec2 coords = vec2(" + op_a + ", " + op_b + ");");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string texture = "textureGather(" + sampler + ", coords, " +
|
std::string texture = "textureGather(" + sampler + ", coords, " +
|
||||||
|
|
Loading…
Reference in a new issue