summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/arrayobj.c6
-rw-r--r--src/mesa/main/mtypes.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index d9ae187bbbd..c7584d903db 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -373,6 +373,10 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
return;
}
+ save_array_object(ctx, newObj);
+ }
+
+ if (!newObj->_Used) {
/* The "Interactions with APPLE_vertex_array_object" section of the
* GL_ARB_vertex_array_object spec says:
*
@@ -380,7 +384,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
* BindVertexArrayAPPLE, determines the semantic of the object."
*/
newObj->ARBsemantics = genRequired;
- save_array_object(ctx, newObj);
+ newObj->_Used = GL_TRUE;
}
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 99dcb389b62..d3001d35c69 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1631,6 +1631,11 @@ struct gl_array_object
*/
GLboolean ARBsemantics;
+ /**
+ * Has this array object been bound?
+ */
+ GLboolean _Used;
+
/** Vertex attribute arrays */
struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];