From 74ae1e4a29173708c89b81e3b869de673e10ff5a Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Thu, 9 Jul 2026 07:41:32 +0000 Subject: [PATCH] [Fix] (MG_Test): expect resolved effective offset in DSA VAO test Since the ARB_vertex_attrib_binding state model (9fbb708e), the flat VertexAttribute view backends consume holds the resolved effective offset (binding offset + relative offset), so glVertexArrayVertexBuffer(offset=16) + glVertexArrayAttribFormat( relativeoffset=12) yields Offset == 28. The old expectation of 12 encoded the pre-refactor bug where the binding offset was clobbered by the last call. Co-Authored-By: Claude Fable 5 --- MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp b/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp index a7937bac..8f19fb2f 100644 --- a/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp +++ b/MobileGL/MG_Test/VertexArray/VertexArrayTest.cpp @@ -330,7 +330,9 @@ TEST_F(GeneralVertexArrayTest, General_DirectStateAccessConfiguresNamedVAOWithou EXPECT_TRUE(attr.Normalized); EXPECT_FALSE(attr.IsInteger); EXPECT_EQ(attr.Stride, 24); - EXPECT_EQ(attr.Offset, 12); + // The flat attribute view holds the resolved effective offset: + // binding offset (16) + attribute relative offset (12). + EXPECT_EQ(attr.Offset, 28); EXPECT_EQ(attr.Buffer, MG_State::pGLContext->GetBufferObject(vertexBuffer)); EXPECT_EQ(vaoObj->GetIndexBufferBindingSlot().GetBoundObject(), MG_State::pGLContext->GetBufferObject(indexBuffer)); EXPECT_EQ(MG_State::pGLContext->GetBoundVertexArray(), boundObj);