From 948f6c07383b7ab84074f3d84a3114a93f77bcd6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 5 Sep 2018 21:45:38 -0400 Subject: gl_shader_decompiler: Implement saturate mode for IPA. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 781ddb073..841647ebe 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -2197,11 +2197,15 @@ private: case OpCode::Id::IPA: { const auto& attribute = instr.attribute.fmt28; 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(), instr.ipa.sample_mode.Value()}; regs.SetRegisterToInputAttibute(reg, attribute.element, attribute.index, input_mode); + + if (instr.ipa.saturate) { + regs.SetRegisterToFloat(reg, 0, regs.GetRegisterAsFloat(reg), 1, 1, true); + } break; } case OpCode::Id::SSY: { -- cgit v1.2.3