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

VU: Expand IBit hack to work for immediates on several instructions #11117

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

refractionpcsx2
Copy link
Member

Description of Changes

Expand the IBit hack to several commands using immediates, to help reduce recompilation on games which modify these values a lot.

Rationale behind Changes

Games like Shellshock - Nam '67 and Killzone modify their VU programs a lot, changing immediate values and nothing else in several cases, This expands the IBit hack to try and ignore these differences and load the values from RAM instead of compiling new program.

Suggested Testing Steps

Test Shellshock - Nam '67, Killzone, Scarface and Crash Tag Team racing. If you know any other games that recompile constantly, try enabling the IBit gamefix and see if that helps.

Reduces VU compilation in Killzone by about half
Reduces VU compilation in Shellshock - Nam '67 by roughly 10% (reduces hitching by a bit)

Copy link
Contributor

@kamfretoz kamfretoz left a comment

Choose a reason for hiding this comment

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

Crash Tag Team Racing LGTM

Screenshot_20240421_151834

pcsx2/x86/microVU_Lower.inl Outdated Show resolved Hide resolved
pcsx2/x86/microVU_Lower.inl Outdated Show resolved Hide resolved
pcsx2/x86/microVU_Lower.inl Show resolved Hide resolved
@stenzek
Copy link
Member

stenzek commented Apr 23, 2024

Returning nullopt in mVUoptimizeConstantAddr() would be cleaner, but I can't remember every place I added that to.

Assembly changes LGTM, untested.

@refractionpcsx2
Copy link
Member Author

Returning nullopt in mVUoptimizeConstantAddr() would be cleaner, but I can't remember every place I added that to.

Assembly changes LGTM, untested.

Done :)

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

5 participants