mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user