GS/HW: Allow conversion from 32bit to 24bit depth #11476
Merged
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
Truncates depth buffers from 32bit to 24bit values when a game requests to read depth as 24bit.
Rationale behind Changes
We store depth as a normalized 0-1 value, so when a game swaps to 24bit it still retains what would normally be the upper 8 bits of the depth buffer. In the case of Harry Potter it expects this top 8 bits to be gone, and it messes up handling of the post processing.
Also added upscaling fixes to said game so it doesn't look sucky when upscaled.
Suggested Testing Steps
Dump run said it was fine, test Harry Potter - Quidditch World Cup. Also try Superman Returns and X-Men - Wolverine's Revenge as they showed up in the dump run as probably hitting this code (have tried them, no noticable difference).
TODO: Need to do DX, OGL, MetalYou can test this dump:
Harry Potter - Quidditch World Cup_SLUS-20769_20240626200416.gs.zip
Master:
PR: