Magma: an enabled scissor test over a never-written box clips nothing instead of everything (DefaultScissorFollowsSurfaceScenario runs on DirectVulkan instead of skipping).

This commit is contained in:
2026-10-09 12:54:23 -04:00
parent 2bbb67e528
commit fcf5ae5659
4 changed files with 22 additions and 9 deletions
@@ -13,7 +13,9 @@
// keeps the surface size in a memo that a swap, a change of draw surface, or a surface's creation
// or destruction invalidates. This case makes a second, larger surface current on the same
// context and clears it with the scissor test on: the clear must reach the larger surface's far
// corner, which a size remembered from the first surface would cut off.
// corner, which a size remembered from the first surface would cut off. DirectVulkan resolves a
// never-written box to the whole framebuffer it draws into, so the same clear reaches the corner
// there too (it used to read the all-zero box as an empty one and clear nothing).
#include <array>
@@ -36,7 +38,6 @@ class DefaultScissorFollowsSurfaceScenario : public ScenarioTest {};
TEST_F(DefaultScissorFollowsSurfaceScenario, AClearOnALargerSurfaceMadeCurrentReachesItsFarCorner) {
if (!Ready() || IsSkipped()) return;
if (Gl().BackendName() != "DirectGLES") GTEST_SKIP() << "the substituted scissor box is DirectGLES's";
const EGLDisplay display = eglGetCurrentDisplay();
const EGLSurface first = eglGetCurrentSurface(EGL_DRAW);
const EGLContext context = eglGetCurrentContext();