Closed NicolBolas closed 4 years ago
Yikes, it does seems all this is not specified. FWIW the NVIDIA driver implements all the missing queries above. There must have been a disconnect between the GL_ARB_vertex_attrib_binding spec, EXT_dsa spec, ARB_dsa spec and the core spec.
Someone will need to figure out all the missing bits for OpenGL 4.6 to complete this specification.
Addressing the issue internally here: https://gitlab.khronos.org/opengl/API/issues/108
Fixed internally - this will show up in the next public spec update.
Fixed in the 2019-10-22 spec updates (hopefully - this was a fairly complex issue, please check).
GL 4.5/ARB_DSA has some oddities in how it accesses vertex array object data.
First, there's this, from the definition of
glGetVertexArrayIndexed
:OK, fine... except that this function also takes
GL_VERTEX_BINDING_OFFSET
, which is supposed to be indexed by binding index, not attribute index. SoGL_MAX_VERTEX_ATTRIBS
is the wrong limit to use.The other problem is that this API does not provide DSA queries for the following (most of which are vertex binding values rather than vertex attribute values):
GL_VERTEX_ATTRIB_ARRAY_BUFFER
(which would fetch the buffer used by the attribute index's binding index) nor a directGL_VERTEX_BINDING_BUFFER
DSA query is provided.GL_VERTEX_ATTRIB_STRIDE
is different fromGL_VERTEX_BINDING_STRIDE
. Indeed, no DSA functions exist which set theGL_VERTEX_ATTRIB_STRIDE
;glVertexArrayVertexBuffer(s)
is defined to only set the binding stride.Basically
glGetVertexArrayIndexed
cannot completely replace the need for binding the VAO and usingglGetVertexAttribIiv
/glGetIntegeri_v
.An interesting note is that ARB_direct_state_access explicitly says that
glGetVertexArrayIndexed
should be added to the "Get Command" in table 23.4 forGL_VERTEX_BINDING_STRIDE
. So clearly someone thought that this function should be able to access the binding stride at least.