From 78c21544d8507fd44d79d1c89780a31159622a50 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 18 Oct 2026 15:16:34 -0400 Subject: [PATCH] [Test] (MG_IntegrationTest/Scenarios): draw each array twice in a row in the one-program narrow case --- .../Scenarios/NarrowIntegerAttributeScenario.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_IntegrationTest/Scenarios/NarrowIntegerAttributeScenario.cpp b/MobileGL/MG_IntegrationTest/Scenarios/NarrowIntegerAttributeScenario.cpp index bd4ab188..dbe22165 100644 --- a/MobileGL/MG_IntegrationTest/Scenarios/NarrowIntegerAttributeScenario.cpp +++ b/MobileGL/MG_IntegrationTest/Scenarios/NarrowIntegerAttributeScenario.cpp @@ -17,8 +17,9 @@ // shaderpacks. The values are captured with transform feedback so every bit is compared. // // The second case draws one program over two vertex arrays that differ only in the signedness -// of the data, in both orders: the correction is chosen per draw from the data, so a pipeline or -// program cached for one array must never be handed to the other. +// of the data, in both orders and each twice in a row: the correction is chosen per draw from the +// data, so a pipeline or program cached for one array, or the variant the previous draw settled +// on, must never be handed to the other. #include #include @@ -281,7 +282,9 @@ void main() const std::vector asSigned = {0xFFFFFFFFu, 0xFFFFFF80u, 5u, 127u}; const std::vector asUnsigned = {255u, 128u, 5u, 127u}; EXPECT_EQ(Capture(program, signedArray, 4), asSigned) << "GL_BYTE first"; + EXPECT_EQ(Capture(program, signedArray, 4), asSigned) << "GL_BYTE twice in a row"; EXPECT_EQ(Capture(program, unsignedArray, 4), asUnsigned) << "then GL_UNSIGNED_BYTE"; + EXPECT_EQ(Capture(program, unsignedArray, 4), asUnsigned) << "GL_UNSIGNED_BYTE twice in a row"; EXPECT_EQ(Capture(program, signedArray, 4), asSigned) << "GL_BYTE again"; EXPECT_EQ(Capture(program, unsignedArray, 4), asUnsigned) << "GL_UNSIGNED_BYTE again"; EXPECT_EQ(glGetError(), GL_NO_ERROR);