Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS/SW: Don't use fast reciprocal stq calculation, it's too inaccurate #11248

Merged
merged 1 commit into from
May 15, 2024

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented May 14, 2024

Description of Changes

Replaces reciprocal Q with normal ST/Q division.

Rationale behind Changes

the original method is quite inaccurate, especially when you're dealing with interpolation and is just not adequate. Sten mentioned that it's likely that there would be a stall with the original multiplication anyway, so the performance difference is negligible. But this fixes a bunch of problems. Faster isn't better if it breaks things.

Suggested Testing Steps

Test games listed below in SW or any you know that have SW only issues. I've checked Armored Core's radar and GOW's controller screen, plus the lines problem in Mercenaries and Klonoa 2, Crash Twinsanity's weird pixels on curves.

Fixes #3295 Metal Gear Solid 2 Locker
Fixes #4825 Spider-Man 3 texture issues
Fixes #6156 Corrects Castlevania map in software mode (Hardware was already fixed)
Corrects #9151 Bonus Demo 08 images in software.

Note: All fixes are for Software ONLY

Bonus Demo 08:
Master:
image
PR:
image

Capcom Vs SNK 2 (Colouring on the healthbars corrected):
Master:
image
PR:
image

Castlevania - Curse of Darkness:
Master:
image
PR:
image

Metal Gear Solid 2:
Master:
image
PR:
image

Spider-Man 3:
Master:
image
PR:
image

Copy link
Contributor

@stenzek stenzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASM changes lgtm

@StillPlay2
Copy link

Awesomeness! All images on Bonus Demo 8 work properly on all tabs

@refractionpcsx2 refractionpcsx2 merged commit 8887930 into master May 15, 2024
22 checks passed
@refractionpcsx2 refractionpcsx2 deleted the gs_swstq branch May 15, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants