GS/HW: Allow creation of known targets via move with offset #11073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Devil May Cry is pretty whacky. It copies the framebuffer at FBP 0x0 to 0x1400 (at the full size...), then draws the subtitle on the copied framebuffer. But it only copies the bottom chunk of it, not the whole thing (512x32 in this example). And it doesn't copy it with a draw, it copies it with a move.
Then it uses the PCRTC to blend the two framebuffers together. Currently, this falls apart, because the heuristic to create a new target via move relies on the destination offset being zero. Which is isn't here, because it's only copying the bottom part of the FB.
So, leverage the hash cache to allow previously-known targets to be created for moves, which means it all happens in hardware (no readback), and preserves upscaling. We also have to inject the clears into the hash cache as well, because this subtitle-framebuffer gets cleared before moved to, not drawn.
Rationale behind Changes
Fixes upscaling with subtitles in Devil May Cry, and gets rid of the readback.
Suggested Testing Steps
Check DMC.