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

microVU: Use uncached reg when clamping for FMAC instructions #4910

Merged
merged 1 commit into from Oct 17, 2021
Merged

microVU: Use uncached reg when clamping for FMAC instructions #4910

merged 1 commit into from Oct 17, 2021

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented Oct 17, 2021

Description of Changes

This was causing broken lighting in 64-bit mode, due to the larger number of registers available. Ft gets loaded and cached, but then the FMAC instructions clamp it in all modes except none, which disturbs the cached value (mismatched with the VU state). Jak happens to rely on this value not being clamped, so it was "okay" in 8-register mode because it had to be reloaded.

Rationale behind Changes

Broken rendering :)

Before:
image

After:
image

Suggested Testing Steps

Test tricky VU games in 64-bit mode. But this should be a relatively safe change I think, unless something was relying on the incorrect behaviour.

@stenzek
Copy link
Member Author

stenzek commented Oct 17, 2021

Also fixes #4824 (confirmed by reporter).

@refractionpcsx2 refractionpcsx2 merged commit 44bc273 into PCSX2:master Oct 17, 2021
@stenzek stenzek deleted the jak-grass branch October 17, 2021 15:16
inactive123 added a commit to libretro/LRPS2 that referenced this pull request Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants