Issue with Vertex Attributes

48 views
Skip to first unread message

Abhishek Deshpande

unread,
May 12, 2025, 9:10:49 AMMay 12
to angleproject
For ANGLE with Vulcan backend, I am running some app.

Consider a below snippet of GLES code

glClear(DEPTH);
glClear(COLOR|DEPTH);

glEnableVertexAttribArray(ind=0x2)
glEnableVertexAttribArray(ind=0x0)
glEnableVertexAttribArray(ind=0x1)
glEnableVertexAttribArray(ind=0x3)

glDrawElements(GL_TRIANGLES, ...) // #Draw 1

glVertexAttribPointer(ind=0x2, ...)
glVertexAttribPointer(ind=0x0, ...)
glVertexAttribPointer(ind=0x1, ...)
glVertexAttribPointer(ind=0x3, ...)

glDrawElements(GL_TRIANGLES, ...) // #Draw 2

For this code, we are seeing that our native GLES driver is able to keep attribute arrays with ind=0x1 and ind=0x2 enabled in #Draw 2 , while ANGLE can not.

I debugged the ANGLE source code and I could not find any reason as to why ANGLE would disable ind=0x1 & ind=0x2.

These arrays are already enabled before #Draw 1 and there is no glDisableVertexArray(...) call in between that would disable it.

Why does ANGLE disable these attrib arrays ?

Thanks in advance.
Abhishek


Shahbaz Youssefi

unread,
May 13, 2025, 2:57:11 AMMay 13
to angleproject
Hello,

Thank you for your report. It's hard to tell what could be wrong just looking at that snippet, at the face of it no attribute should be disabled like you said.

The best way to get this bug fixed is, if you are able, to contribute an end2end test. You can add one to VertexAttributeTest.cpp, and follow the instructions in https://chromium.googlesource.com/angle/angle/+/main/doc/ContributingCode.md to upload it to gerrit for review. That way, I or others could easily take your test and debug it, and once the test lands you can also get credit for it :)

Cheers,

Reply all
Reply to author
Forward
0 new messages