forked from suyu/suyu
gl_shader_decompiler: Implement saturate mode for IPA.
This commit is contained in:
parent
fbaefc47a0
commit
948f6c0738
1 changed files with 5 additions and 1 deletions
|
@ -2197,11 +2197,15 @@ private:
|
||||||
case OpCode::Id::IPA: {
|
case OpCode::Id::IPA: {
|
||||||
const auto& attribute = instr.attribute.fmt28;
|
const auto& attribute = instr.attribute.fmt28;
|
||||||
const auto& reg = instr.gpr0;
|
const auto& reg = instr.gpr0;
|
||||||
ASSERT_MSG(instr.ipa.saturate == 0, "IPA saturate not implemented");
|
|
||||||
Tegra::Shader::IpaMode input_mode{instr.ipa.interp_mode.Value(),
|
Tegra::Shader::IpaMode input_mode{instr.ipa.interp_mode.Value(),
|
||||||
instr.ipa.sample_mode.Value()};
|
instr.ipa.sample_mode.Value()};
|
||||||
regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index,
|
regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index,
|
||||||
input_mode);
|
input_mode);
|
||||||
|
|
||||||
|
if (instr.ipa.saturate) {
|
||||||
|
regs.SetRegisterToFloat(reg, 0, regs.GetRegisterAsFloat(reg), 1, 1, true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OpCode::Id::SSY: {
|
case OpCode::Id::SSY: {
|
||||||
|
|
Loading…
Reference in a new issue