GS/HW: Various small fixes - #14782
Open
refractionpcsx2 wants to merge 4 commits into
Open
Conversation
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
Fixes various small things, GPU CLUT when the CLUT block pointer is badly offset in to the page now ignored, alpha channels of CT24 gets updated if the alpha is valid, restrict the CPU Sprite Render from being used if the FBMSK (framebuffer mask) is not of a valid combination which can be represented by a format for invalidation, and detect width mismatches on source textures that are based on the alpha channel of a target.
Rationale behind Changes
GPU CLUT Changes: Having block offsets which are not 4 block aligned in the HW renderer don't work correctly as we don't support swizzling, so this can result in bad information, so best avoid GPU CLUT.
Alpha Updates: Sometimes formats can switch between CT24 and CT32, leaving valid alpha information, so it's good to keep this updated in case it gets used.
CPU Sprite Renderer: If the framebuffer is partially masked on the alpha or RGB, it will invalidate perfectly valid data, so we need to avoid using it in situations where we can't invalidate either just RGB or Alpha.
Source Textures: Some games (mainly Japanese ones) store fonts etc in the alpha channel of the framebuffer, but they tend to be read at a different pitch than the main framebuffer which doesn't work very well in the hardware renderer, and we don't currently have a way to reorganise the pages nicely, so now it just refuses to use the target.
Suggested Testing Steps
Test below games and some random other games.
Did you use AI to help find, test, or implement this issue or feature?
No
Fixes #971
Kuon:


Master:
PR:
MotoGP:


Master:
PR:
Smash Court Tennis Pro Tournament:


Master:
PR:
Ultimate Spider-Man: (look at the bottom of the frames, but also the doors when in motion)


Master:
PR: