GS-HW: Improve Local->Host and preload accuracy. Per channel dirtying targets.#8249
Merged
refractionpcsx2 merged 3 commits intomasterfrom Feb 26, 2023
Merged
GS-HW: Improve Local->Host and preload accuracy. Per channel dirtying targets.#8249refractionpcsx2 merged 3 commits intomasterfrom
refractionpcsx2 merged 3 commits intomasterfrom
Conversation
This was referenced Feb 25, 2023
c7246bc to
17f07c1
Compare
17f07c1 to
2f750de
Compare
2f750de to
d7866b7
Compare
JordanTheToaster
approved these changes
Feb 25, 2023
09c48e1 to
1ef7bb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Improves the local memory invalidation skipping, and target selection for invalidation, but also fixes some bugs with preloading memory in to target.
Also support per channel dirtying of target textures.
Rationale behind Changes
This wasn't quite right, there were edge cases and it was a bit fast and loose in some scenarios, this tries to be heuristically more accurate.
Some games also update just alpha channels on a 32bit colour, and previously we'd wipe out the RGB also and load it from local memory, this would of course load in garbage, so now it will attempt to only reload the necessary channels.
Overlap check also needed a fix as if the start and end pixel are within the same page, it's entirely possible due to the PS2 memory swizzling that the start block is higher than the end block, which will cause the validation check to fail, so now I check if they are within a page apart, if so then swap them.
Suggested Testing Steps
Test games with readbacks (From Software games, Dog's Life, Busin 0, Ratchet Gladiator, Chaos Legion, Red Faction 2, SOCOM 2, Final Fantasy X, Kingdom Hearts 2, though I have briefly tested these myself), plus general stuff in terms of the dirtying.
Fixes Dog's Life regression with smell-o-vision (Download invalidation stuff)
Fixes #914 Ratchet & Clank pause screen background (Preload changes)
Fixes RTX Red Rock menu and textures (Dirty channels)
Fixes Driving Emotion Type S overlay properly (Dirty channels) will require further upscaling fixes to make it look good.
Fixes #4086 X-Men Wolverine black bars on the picture (Dirty channels), not 100% right, but good enough.
Fixes #5750 Shadow Hearts 2 flickering cutscenes. Not quite sure which, possibly the GS Download behaviour.
Fixes regression on Kingdom Hearts 2 (Overlap fix)
might fix Eternal Ring textures.
Ratchet & Clank pause screen:

Eternal Ring textures:

Driving Emotion Type-S:
Master:

PR:

RTX Red Rock:
Master:

PR:

Ingame looks good too! :)

X-Men Wolverine:
Master:

PR:
