pcsx2
pcsx2 copied to clipboard
GS:MTL: Implement missing functions
Description of Changes
Implements some functions that were missing from the Metal renderer
- Implements ClearSamplerCache, so GSConfig.MaxAnisotropy changes are now reflected on settings changes
- Implements InvalidateRenderTarget, for a small performance improvement on M1 Macs
- Implements DrawMultiStretchRects, for a small performance improvement
Also reduces the size of the index expansion buffer, as it was previously 4x the maximum supported index count
Rationale behind Changes
Add missing features to the Metal renderer
Suggested Testing Steps
- Test things that use DrawMultiStretchRects heavily (@stenzek do you have any recommendations?)
- Test on M1 to make sure the InvalidateRenderTarget changes didn't break anything (InvalidateRenderTarget has no effect on not-M1)
I'm not aware of any games which use multiple writes off the top of my head.
It was mainly a thing for Destroy All Humans, before I switched it over to offset tex-in-rt instead. I'm keeping the merge targets thing around for Guitar Hero (eventually..).
Unrelated but maybe you could also replace the deprecated texture barrier with the new function that you mentioned.
Unrelated but maybe you could also replace the deprecated texture barrier with the new function that you mentioned.
Done
Works fine on M1, LGTM