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.
The PSP's GPU doesn't have any real triangle clipping to the sides - all it does is scissor off the pixels outside. Thus, the viewport only positions and scales the rendering, it doesn't restrict it. So if a game sets a viewport that would result in a PC GPU viewport rectangle that's smaller than the scissor rectangle, we need to expand the viewport to fill it up.
Fortunately we already had code to do the opposite - cut the viewport down in case it was outside the framebuffer and scale the projection matrix to compensate. This logic can easily do the reverse, too.
Dante's Inferno's bloom effect used a weird viewport when clearing the bloom subtract buffer, where the viewport didn't end up covering the whole thing. That resulted in #4845, which this PR fixes. Who knows what else it might fix...
Fixes #4845.
I have not yet written a hardware test to confirm this (though I plan to), but it makes sense and if it's not like this, the bug in Dante's Inferno makes zero sense.