mesa: Implement GetVertexArrayiv
Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
This commit is contained in:
@@ -524,6 +524,12 @@
|
|||||||
<param name="divisor" type="GLuint" />
|
<param name="divisor" type="GLuint" />
|
||||||
</function>
|
</function>
|
||||||
|
|
||||||
|
<function name="GetVertexArrayiv" offset="assign">
|
||||||
|
<param name="vaobj" type="GLuint" />
|
||||||
|
<param name="pname" type="GLenum" />
|
||||||
|
<param name="param" type="GLint *" />
|
||||||
|
</function>
|
||||||
|
|
||||||
<!-- Sampler object functions -->
|
<!-- Sampler object functions -->
|
||||||
|
|
||||||
<function name="CreateSamplers" offset="assign">
|
<function name="CreateSamplers" offset="assign">
|
||||||
|
@@ -685,3 +685,37 @@ _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
|
|||||||
if (bufObj)
|
if (bufObj)
|
||||||
_mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
|
_mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GLAPIENTRY
|
||||||
|
_mesa_GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
|
||||||
|
{
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
struct gl_vertex_array_object *vao;
|
||||||
|
|
||||||
|
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||||
|
|
||||||
|
/* The GL_ARB_direct_state_access specification says:
|
||||||
|
*
|
||||||
|
* "An INVALID_OPERATION error is generated if <vaobj> is not
|
||||||
|
* [compatibility profile: zero or] the name of an existing
|
||||||
|
* vertex array object."
|
||||||
|
*/
|
||||||
|
vao =_mesa_lookup_vao_err(ctx, vaobj, "glGetVertexArrayiv");
|
||||||
|
if (!vao)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* The GL_ARB_direct_state_access specification says:
|
||||||
|
*
|
||||||
|
* "An INVALID_ENUM error is generated if <pname> is not
|
||||||
|
* ELEMENT_ARRAY_BUFFER_BINDING."
|
||||||
|
*/
|
||||||
|
if (pname != GL_ELEMENT_ARRAY_BUFFER_BINDING) {
|
||||||
|
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||||
|
"glGetVertexArrayiv(pname != "
|
||||||
|
"GL_ELEMENT_ARRAY_BUFFER_BINDING)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
param[0] = vao->IndexBufferObj->Name;
|
||||||
|
}
|
||||||
|
@@ -102,4 +102,6 @@ GLboolean GLAPIENTRY _mesa_IsVertexArray( GLuint id );
|
|||||||
|
|
||||||
void GLAPIENTRY _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer);
|
void GLAPIENTRY _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer);
|
||||||
|
|
||||||
|
void GLAPIENTRY _mesa_GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param);
|
||||||
|
|
||||||
#endif /* ARRAYOBJ_H */
|
#endif /* ARRAYOBJ_H */
|
||||||
|
@@ -1028,6 +1028,7 @@ const struct function gl_core_functions_possible[] = {
|
|||||||
{ "glVertexArrayAttribLFormat", 45, -1 },
|
{ "glVertexArrayAttribLFormat", 45, -1 },
|
||||||
{ "glVertexArrayAttribBinding", 45, -1 },
|
{ "glVertexArrayAttribBinding", 45, -1 },
|
||||||
{ "glVertexArrayBindingDivisor", 45, -1 },
|
{ "glVertexArrayBindingDivisor", 45, -1 },
|
||||||
|
{ "glGetVertexArrayiv", 45, -1 },
|
||||||
{ "glCreateSamplers", 45, -1 },
|
{ "glCreateSamplers", 45, -1 },
|
||||||
{ "glCreateProgramPipelines", 45, -1 },
|
{ "glCreateProgramPipelines", 45, -1 },
|
||||||
{ "glCreateQueries", 45, -1 },
|
{ "glCreateQueries", 45, -1 },
|
||||||
|
Reference in New Issue
Block a user