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

GS/HW: Allow creation of known targets via move with offset #11073

Merged
merged 2 commits into from Apr 14, 2024

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented Apr 14, 2024

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.

image

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.

Fixes upscaling with subtitles in Devil May Cry.
@bigol83
Copy link

bigol83 commented Apr 14, 2024

Can confirm this fixes the subtitles upscaling, nice job 👍

Though there is still an issue with subtitles corrupting the fmv videos, like intro, even at native resolution.
Devil May Cry_SLES-50358_20240414125502.gs.zip

Devil May Cry_SLES-50358_20240414125502

@stenzek
Copy link
Member Author

stenzek commented Apr 14, 2024

Separate issue, unrelated to this PR. Please open an issue for it.

Details: Two layers, it writes the background, but never draws to the target, so the transfer list gets destroyed, and by the time it gets picked up by the PCRTC on the next frame, it has no history of the writes.

image

@stenzek stenzek merged commit 55907bf into PCSX2:master Apr 14, 2024
12 checks passed
@stenzek stenzek deleted the i-like-to-move-it-move-it branch April 14, 2024 12:29
@bigol83
Copy link

bigol83 commented Apr 14, 2024

Ok, will open a new issue.

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

2 participants