[Piglit] [PATCH 11/14] arb_direct_state_access: Add a test for glGetVertexArray*iv
Emil Velikov
emil.l.velikov at gmail.com
Fri Apr 3 06:52:10 PDT 2015
On 31 March 2015 at 18:26, Fredrik Höglund <fredrik at kde.org> wrote:
> This test verifies that glGetVertexArrayiv,
> glGetVertexArrayIndexediv, and glGetVertexArrayIndexed64iv work
> as expected.
> ---
> +static bool
> +test_getvertexarrayindexediv(GLuint vao)
> +{
> + struct {
> + GLenum pname;
> + bool supported;
> + } valid_pnames[] = {
> + {
> + GL_VERTEX_ATTRIB_ARRAY_ENABLED,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_SIZE,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_STRIDE,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_TYPE,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_INTEGER,
> + piglit_get_gl_version() >= 30,
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_LONG,
> + piglit_is_extension_supported(
> + "GL_ARB_vertex_array_64bit"),
> + },
> + {
> + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_RELATIVE_OFFSET,
> + true,
> + },
> + {
> + GL_VERTEX_ATTRIB_BINDING,
> + true,
> + },
> + {
> + GL_VERTEX_BINDING_BUFFER,
> + true,
> + },
> + {
> + GL_VERTEX_BINDING_STRIDE,
> + true,
> + },
> + {
> + GL_VERTEX_BINDING_DIVISOR,
> + piglit_is_extension_supported(
> + "GL_ARB_instanced_arrays"),
> + },
> + };
> +
Not sure how much one should care, but having such lists as static
and/or const is always a good idea :-)
I think some of your other patches do a similar thing.
-Emil
More information about the Piglit
mailing list