pcsx2
pcsx2 copied to clipboard
VU: Expand IBit hack to work for immediates on several instructions
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)
Returning nullopt in mVUoptimizeConstantAddr()
would be cleaner, but I can't remember every place I added that to.
Assembly changes LGTM, untested.
Returning nullopt in
mVUoptimizeConstantAddr()
would be cleaner, but I can't remember every place I added that to.Assembly changes LGTM, untested.
Done :)