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

Core: Const Reg flushing fix + COP2/Int CLIP fix #12371

Merged
merged 2 commits into from
Mar 2, 2025

Conversation

refractionpcsx2
Copy link
Member

Description of Changes

Delete Const registers when flushing them completely for drop to interpreter

Propagate the CLIP_FLAG value if it gets written via CTC2 on the EE interpreters, as if the CLIP instruction is run directly after, it will have the wrong clip value. VU JIT doesn't suffer from this as COP2 is direct for both.

Rationale behind Changes

With constants, if you dropped to interpreter and the reg that was constant got written it didn't clear the constant status, causing everything to explode. No idea if this affects anything outside of development where we may force dropping to interpreter, I noticed it when forcing FPU RECOMPILE down to interpreter while trying Soft Float on Twin Caliber. I don't expect any real performance impact as we don't drop out of the EE JIT very often at all.

the CLIP_FLAG issue is because the VU Int (used by EE Interpreter for COP2 instructions) only uses its internal VU0.clipflag value, which it then overwrites the real CLIP_FLAG after the CLIP operation has run, however if the CLIP_FLAG was updated via CTC2, it didn't update VU0.clipflag, so the CLIP operation was running on the incorrect value. Noticed with Simple 2000 Series Vol. 109 - The Taxi 2.

Suggested Testing Steps

Test some random stuff on EE interpreter and JIT, just make sure everything is okay.

… use in COP2

This value was being updated then COP2 running VCLIP would have the wrong original clip flag value to work from.
@refractionpcsx2 refractionpcsx2 changed the title Core: Delete constant regs when flushing to interpreter Core: Const Reg flushing fix + COP2/Int CLIP fix Feb 28, 2025
@refractionpcsx2 refractionpcsx2 merged commit 9c3ae79 into master Mar 2, 2025
22 checks passed
@refractionpcsx2 refractionpcsx2 deleted the core_clipconst branch March 2, 2025 18:17
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.

3 participants