From 601f1d708d6c12e5234485fa76be6c6533e77c9b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 24 Dec 2023 21:09:33 +1000 Subject: [PATCH 1/2] x86/FPU: Always preserve sign in neg.s --- pcsx2/x86/iFPU.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcsx2/x86/iFPU.cpp b/pcsx2/x86/iFPU.cpp index c9af3d97db91c..4cf5f2f58a92b 100644 --- a/pcsx2/x86/iFPU.cpp +++ b/pcsx2/x86/iFPU.cpp @@ -1669,7 +1669,10 @@ void recNEG_S_xmm(int info) //xAND(ptr32[&fpuRegs.fprc[31]], ~(FPUflagO|FPUflagU)); // Clear O and U flags xXOR.PS(xRegisterSSE(EEREC_D), ptr[&s_neg[0]]); - ClampValues(EEREC_D); + + // Always preserve sign. Using float clamping here would result in + // +inf to become +fMax instead of -fMax, which is definitely wrong. + fpuFloat3(EEREC_D); } FPURECOMPILE_CONSTCODE(NEG_S, XMMINFO_WRITED | XMMINFO_READS); From 1d2ef4fafc48c1601bc4d94591ab3361cb2d1053 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 24 Dec 2023 21:18:31 +1000 Subject: [PATCH 2/2] GameDB: Remove mention of full clamp for GT4 --- bin/resources/GameIndex.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 4126708348ba9..02f9a2dc258af 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -314,7 +314,6 @@ PAPX-90512: region: "NTSC-J" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -523,7 +522,6 @@ PBPX-95523: trilinearFiltering: 1 halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post processing. - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. PBPX-95524: name: "Gran Turismo 4 - Prologue [PlayStation 2 Racing Pack]" @@ -534,7 +532,6 @@ PBPX-95524: trilinearFiltering: 1 halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post processing. - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. PBPX-95525: name: "Final Fantasy XII" @@ -561,7 +558,6 @@ PBPX-95601: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # eeClampMode = 3 Text in races works. PCPX-96301: name: "I.Q Remix+ - Intelligent Qube" region: "NTSC-J" @@ -767,7 +763,6 @@ PCPX-96649: trilinearFiltering: 1 halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post processing. - # eeClampMode = 3 Text in races works. PCPX-96653: name: "Ratchet & Clank 3" region: "NTSC-J" @@ -1176,7 +1171,6 @@ SCAJ-20066: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. SCAJ-20067: name: "GunGrave O.D." @@ -2051,14 +2045,12 @@ SCAJ-30006: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # eeClampMode = 3 Text in races works. SCAJ-30007: name: "Gran Turismo 4" region: "NTSC-Unk" compat: 5 clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -2069,7 +2061,6 @@ SCAJ-30008: region: "NTSC-Unk" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -3135,7 +3126,6 @@ SCED-52455: trilinearFiltering: 1 halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post processing. - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. SCED-52461: name: "SingStar [Press Kit]" @@ -4675,7 +4665,6 @@ SCES-51719: compat: 5 clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -4923,7 +4912,6 @@ SCES-52438: - "SCES-51719" - "SCES-52438" - "SCES-50294" - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. SCES-52456: name: "Ratchet & Clank 3" @@ -6333,7 +6321,6 @@ SCKA-20022: trilinearFiltering: 1 halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post processing. - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. SCKA-20023: name: "Fatal Frame II" @@ -6961,7 +6948,6 @@ SCKA-30001: region: "NTSC-K" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -7645,7 +7631,6 @@ SCPS-15055: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # eeClampMode = 3 Text in races works. # vuClampMode = 2 Text in GT mode works. SCPS-15056: name: ラチェット&クランク2 ガガガ!銀河のコマンドーっす @@ -8212,7 +8197,6 @@ SCPS-17001: compat: 5 clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -8466,7 +8450,6 @@ SCPS-19252: region: "NTSC-J" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -8541,7 +8524,6 @@ SCPS-19304: - "SCPS-15009" - "SCPS-55007" # vuClampMode = 2 Text in GT mode works. - # eeClampMode = 3 Text in races works. SCPS-19305: name: SIREN PS2 the Best name-sort: SIREN PS2 the Best @@ -9299,7 +9281,6 @@ SCUS-90682: region: "NTSC-U" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -10109,7 +10090,6 @@ SCUS-97328: compat: 5 clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -10503,7 +10483,6 @@ SCUS-97436: region: "NTSC-U" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1 @@ -10721,7 +10700,6 @@ SCUS-97483: region: "NTSC-U" clampModes: vuClampMode: 2 # Text in GT mode works. - # eeClampMode = 3 Text in races works. gsHWFixes: mipmap: 2 # Mipmap + trilinear, improves ground textures to match sw renderer. trilinearFiltering: 1