Skip to content

glGetVertexArrayIndexediv() missing VERTEX_ATTRIB_BINDING #675

Open

Description

@tksuoran

GetVertexAttrib*() exposes queries to currently bound vertex array, to these properties:

  • VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
  • VERTEX_ATTRIB_ARRAY_ENABLED
  • VERTEX_ATTRIB_ARRAY_SIZE
  • VERTEX_ATTRIB_ARRAY_STRIDE
  • VERTEX_ATTRIB_ARRAY_TYPE
  • VERTEX_ATTRIB_ARRAY_NORMALIZED
  • VERTEX_ATTRIB_ARRAY_INTEGER
  • VERTEX_ATTRIB_ARRAY_LONG
  • VERTEX_ATTRIB_ARRAY_DIVISOR
  • VERTEX_ATTRIB_BINDING
  • VERTEX_ATTRIB_RELATIVE_OFFSET
  • CURRENT_VERTEX_ATTRIB

Meanwhile GetVertexArrayIndexed() provides query to specific vertex array without needing to bind it to make the query. However, the list of queriable properties appears to be missing VERTEX_ATTRIB_BINDING:

  • VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
  • VERTEX_ATTRIB_ARRAY_ENABLED
  • VERTEX_ATTRIB_ARRAY_SIZE
  • VERTEX_ATTRIB_ARRAY_STRIDE
  • VERTEX_ATTRIB_ARRAY_TYPE
  • VERTEX_ATTRIB_ARRAY_NORMALIZED
  • VERTEX_ATTRIB_ARRAY_INTEGER
  • VERTEX_ATTRIB_ARRAY_LONG
  • VERTEX_ATTRIB_ARRAY_DIVISOR
  • VERTEX_ATTRIB_RELATIVE_OFFSET
  • VERTEX_BINDING_STRIDE
  • VERTEX_BINDING_DIVISOR
  • VERTEX_BINDING_BUFFER

What happened to VERTEX_ATTRIB_BINDING?

It looks like at least MESA driver supports GetVertexArrayIndexed(VERTEX_ATTRIB_BINDING) query, but not some other drivers.

Activity

  1. tksuoran commented on Jan 29, 2026

    @tksuoran
    ContributorAuthor

    Original extension https://registry.khronos.org/OpenGL/extensions/ARB/ARB_direct_state_access.txt has this:

        Modify Table 23.4, "Vertex Array Object State"
    
        Add GetVertexArrayiv in 'Get Command' for
        ELEMENT_ARRAY_BUFFER_BINDING state
    
        Add GetVertexArrayIndexediv in 'Get Command' for
        VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
        VERTEX_ATTRIB_BINDING,
        VERTEX_ATTRIB_RELATIVE_OFFSET,
        VERTEX_BINDING_OFFSET, and
        VERTEX_BINDING_STRIDE states
    

    So I think the intention was to allow VERTEX_ATTRIB_BINDING for GetVertexArrayIndexediv(). But this was not mentioned in " For GetVertexArrayIndexediv, must be one of" part of the extension. Also, the core spec state tables don't seem to mention DSA functions.

    I am guessing that by accident, the DSA extension only mentioned VERTEX_ATTRIB_BINDING for Table 23.4, and because of that, when DSA was added to core, and state tables left out the DSA functions, the VERTEX_ATTRIB_BINDING was not carried to the core by accident.

    Another question is, if I use GetVertexArrayIndexediv via the extension, I should be able to query VERTEX_ATTRIB_BINDING, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions