summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2015-05-10 20:54:18 +0200
committerFredrik Höglund <fredrik@kde.org>2015-05-14 15:48:17 +0200
commit36b05793372b86b914d9b95d0188f5f387e01d68 (patch)
tree5df4e311618ab53bab862c0c6bdb3e20f51a4cf1 /src/mesa/main/arrayobj.c
parent8940957238e8584ce27295791cee4cc3d6f7cf1e (diff)
downloadexternal_mesa3d-36b05793372b86b914d9b95d0188f5f387e01d68.zip
external_mesa3d-36b05793372b86b914d9b95d0188f5f387e01d68.tar.gz
external_mesa3d-36b05793372b86b914d9b95d0188f5f387e01d68.tar.bz2
mesa: Add ARB_direct_state_access checks in VAO functions
Signed-off-by: Fredrik Höglund <fredrik@kde.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 7c40040..320f435 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -617,6 +617,14 @@ void GLAPIENTRY
_mesa_CreateVertexArrays(GLsizei n, GLuint *arrays)
{
GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.ARB_direct_state_access) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCreateVertexArrays(GL_ARB_direct_state_access "
+ "is not supported");
+ return;
+ }
+
gen_vertex_arrays(ctx, n, arrays, true, "glCreateVertexArrays");
}
@@ -659,6 +667,13 @@ _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
struct gl_vertex_array_object *vao;
struct gl_buffer_object *bufObj;
+ if (!ctx->Extensions.ARB_direct_state_access) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glVertexArrayElementBuffer(GL_ARB_direct_state_access "
+ "is not supported");
+ return;
+ }
+
ASSERT_OUTSIDE_BEGIN_END(ctx);
/* The GL_ARB_direct_state_access specification says:
@@ -695,6 +710,13 @@ _mesa_GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (!ctx->Extensions.ARB_direct_state_access) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetVertexArrayiv(GL_ARB_direct_state_access "
+ "is not supported");
+ return;
+ }
+
/* The GL_ARB_direct_state_access specification says:
*
* "An INVALID_OPERATION error is generated if <vaobj> is not