GS/HW: Calculate alpha on updated areas on RT invalidation #10861
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
Calculates the alpha values of the dirty areas being updated from GS memory, for keeping the RT information up to date.
Rationale behind Changes
We didn't do this before, and just assumed full range alpha on invalidation, but this isn't true and removes some optimisation situations. This will help potentially with #10853
Suggested Testing Steps
Smoke test, mostly. GS Dump run was fine, some very minor changes, probably due to doing things in shader rather than hardware.
Driv3r (look at the gradient on the left wall):
Master:
PR:
Evergrace 2:
Barriers: -133 [272=>139] (but this is only for one frame)
Forever Kingdom:
Barriers: -309 [320=>11]
Keroro Gunsou:
Draw Calls: -2 [178=>176]
Render Passes: -7 [83=>76]
Barriers: -10 [96=>86]