Detect framebuffers that live in the "stride gap" of others, fix size #15900
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.
Some games, including the ones mentioned in #15898, place a small buffer in the vertical gap, created between a 480px wide main framebuffer, and a stride of 512 pixels. For some reason 512 is regarded as a better stride than 480, so many games size their buffers that way, leaving the gap.
This detects such buffers in a pretty safe and strict way, and make sure that their drawing_width is set accordingly, leading to less memory use and a slightly more sane debugging experience.
This does not solve #15898, but is a small, separate step on the way so let's get it in for testing.