GS/HW: Fix some channel shuffle and target match behaviour #10458
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
Fixes some behaviour for alpha shuffles, also fix handling of dst matches when target is used as a source or the entire content is invalidated.
Rationale behind Changes
Channel shuffle change: Alpha just wasnt' handled, there was a note there saying "let's choose blue" like a flip of a coin.
DST Matches change: There were cases where games were using a target as a different format, or adding an alpha channel to a 24bit value, but things were getting out of sync. Terminator 3 was using this with old data in the RGB (where the depth was), Final Fantasy X-2 used part of the Z buffer as a 16bit target, but this later got completely cleared and we weren't removing the target due to the valid size being different, now we invalidate dst matches based on the area drawn to them.
Suggested Testing Steps
Check The Terminator 3 and the menus in Final Fantasy X-2. Maybe a sprinkle of other games.
Final Fantasy X-2:
Master:
PR:
Terminator 3:
Master:
PR: