pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

GS:MTL: Implement missing functions

Open TellowKrinkle opened this issue 2 years ago • 2 comments

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)

TellowKrinkle avatar May 14 '23 22:05 TellowKrinkle

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..).

stenzek avatar May 15 '23 09:05 stenzek

Unrelated but maybe you could also replace the deprecated texture barrier with the new function that you mentioned.

lightningterror avatar May 15 '23 14:05 lightningterror

Unrelated but maybe you could also replace the deprecated texture barrier with the new function that you mentioned.

Done

TellowKrinkle avatar May 17 '23 03:05 TellowKrinkle

Works fine on M1, LGTM

DigitalMajestic avatar May 17 '23 22:05 DigitalMajestic