summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 5ee68cf9e94..a23031fe182 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -196,7 +196,16 @@ _mesa_vao_attribute_map[ATTRIBUTE_MAP_MODE_MAX][VERT_ATTRIB_MAX] =
struct gl_vertex_array_object *
_mesa_lookup_vao(struct gl_context *ctx, GLuint id)
{
+ /* The ARB_direct_state_access specification says:
+ *
+ * "<vaobj> is [compatibility profile:
+ * zero, indicating the default vertex array object, or]
+ * the name of the vertex array object."
+ */
if (id == 0) {
+ if (ctx->API == API_OPENGL_COMPAT)
+ return ctx->Array.DefaultVAO;
+
return NULL;
} else {
struct gl_vertex_array_object *vao;