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.
See dolphin-emu/dolphin#10251. The test I originally wrote is here.
Here is the output from a real Wii. The software renderer gives identical output with that PR. Vulkan doesn't pass all of the tests, but it always correctly includes one of the rectangles; the PR doesn't currently attempt to set up multiple viewports so that multiple rectangles can end up on screen, so this is the expected result. Running the test on my main Wii does give varying failures, but it's always the same locations that fail, so I think this is caused by failing RAM. (I'm guessing specific tests fail more often than others because those tests are ones where the screen is expected to be blank, and thus the only ones where the entire screen is checked.) Those failures didn't happen on my secondary Wii.
This test doesn't currently check what happens in the region outside of the viewport, as that currently isn't emulated. It does render something there, but the blue channel for that is set to be the same as the clear color, so the main test doesn't look at it. This could be implemented later on if this ends up being something we care about, but it could also be part of the clipping test (which currently fails on real hardware?)