From 648fc92184d8d0fe2d951be73c88ed23de736181 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Wed, 24 Jan 2018 12:09:02 +0300 Subject: [PATCH] rsx/fp/vp: Epsilon value is too large! - Original epsilon value was 1.E-10 which nvidia linux driver could not read properly -- Restores the original value represented in decimal notation --- rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp | 4 ++-- rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp index 1d00c820be..b033cf86f6 100644 --- a/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/FragmentProgramDecompiler.cpp @@ -195,12 +195,12 @@ std::string FragmentProgramDecompiler::AddX2d() //Failure to catch causes infinite values since theres alot of rcp(0) std::string FragmentProgramDecompiler::NotZero(const std::string& code) { - return "(max(abs(" + code + "), 0.000001) * sign(" + code + "))"; + return "(max(abs(" + code + "), 0.0000000001) * sign(" + code + "))"; } std::string FragmentProgramDecompiler::NotZeroPositive(const std::string& code) { - return "max(abs(" + code + "), 0.000001)"; + return "max(abs(" + code + "), 0.0000000001)"; } std::string FragmentProgramDecompiler::ClampValue(const std::string& code, u32 precision) diff --git a/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp b/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp index 81f5750f8c..eec647412c 100644 --- a/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp +++ b/rpcs3/Emu/RSX/Common/VertexProgramDecompiler.cpp @@ -376,7 +376,7 @@ void VertexProgramDecompiler::SetDSTSca(const std::string& code) std::string VertexProgramDecompiler::NotZeroPositive(const std::string& code) { - return "max(" + code + ", 0.000001)"; + return "max(" + code + ", 0.0000000001)"; } std::string VertexProgramDecompiler::BuildFuncBody(const FuncInfo& func)