diff --git a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp index eed059824b..a4e7fcc1b7 100644 --- a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp @@ -644,6 +644,21 @@ template std::string FragmentProgramDecompiler::GetSRC(T src) break; } + if (apply_precision_modifier && !src.neg) + { + if constexpr (!std::is_same::value) + { + if (dst.opcode == RSX_FP_OPCODE_MAD) + { + // Hardware tests show special behavior on MAD operation + // Only src0 obeys precision modifier (sat tested) + // Results: 1 * 100 + 0 = 100, 1 * 1 + 100 = 100, 100 * 1 + 0 = 1 + // NOTE: Neg modifier seems to break this rule; 1 * -100 + 0 = -1 not -99 + apply_precision_modifier = false; + } + } + } + static const char f[4] = { 'x', 'y', 'z', 'w' }; std::string swizzle;