aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-22 17:01:15 +1000
committerTimothy Arceri <[email protected]>2017-04-26 10:03:06 +1000
commit7927d0378fc72ceff7d0ddcbe7c21756f0e1f4ea (patch)
treead3629327bdf9186f4bdad5561decabfc973d5ea /src/mesa/main/arrayobj.c
parent7b9963a28f432920428f7fac5f6dba7b2996cd16 (diff)
mesa: drop APPLE_vertex_array_object support
Shared context support for VAOs was dropped in 0b2750620b65. From the ARB_vertex_array_object spec: "This extension differs from GL_APPLE_vertex_array_object in that client memory cannot be accessed through a non-zero vertex array object. It also differs in that vertex array objects are explicitly not sharable between contexts." Nobody should be using this extension over ARB_vertex_array_object anymore so just drop it rather than adding locking back just for VAOs created from these functions. For reference the Nvidia blob doesn't expose this extension. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c63
1 files changed, 10 insertions, 53 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index b901a891dc2..10502015cf0 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -28,9 +28,8 @@
/**
* \file arrayobj.c
*
- * Implementation of Vertex Array Objects (VAOs), from OpenGL 3.1+,
- * the GL_ARB_vertex_array_object extension, or the older
- * GL_APPLE_vertex_array_object extension.
+ * Implementation of Vertex Array Objects (VAOs), from OpenGL 3.1+ /
+ * the GL_ARB_vertex_array_object extension.
*
* \todo
* The code in this file borrows a lot from bufferobj.c. There's a certain
@@ -418,12 +417,12 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao)
/**
- * Helper for _mesa_BindVertexArray() and _mesa_BindVertexArrayAPPLE().
+ * Helper for _mesa_BindVertexArray().
* \param genRequired specifies behavour when id was not generated with
* glGenVertexArrays().
*/
static void
-bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
+bind_vertex_array(struct gl_context *ctx, GLuint id)
{
struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
struct gl_vertex_array_object *newObj = NULL;
@@ -446,20 +445,9 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
/* non-default array object */
newObj = _mesa_lookup_vao(ctx, id);
if (!newObj) {
- if (genRequired) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBindVertexArray(non-gen name)");
- return;
- }
-
- /* For APPLE version, generate a new array object now */
- newObj = _mesa_new_vao(ctx, id);
- if (!newObj) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
- return;
- }
-
- save_array_object(ctx, newObj);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindVertexArray(non-gen name)");
+ return;
}
if (!newObj->EverBound) {
@@ -469,7 +457,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
* "The first bind call, either BindVertexArray or
* BindVertexArrayAPPLE, determines the semantic of the object."
*/
- newObj->ARBsemantics = genRequired;
+ newObj->ARBsemantics = GL_TRUE;
newObj->EverBound = GL_TRUE;
}
}
@@ -496,31 +484,12 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
/**
* ARB version of glBindVertexArray()
- * This function behaves differently from glBindVertexArrayAPPLE() in
- * that this function requires all ids to have been previously generated
- * by glGenVertexArrays[APPLE]().
*/
void GLAPIENTRY
_mesa_BindVertexArray( GLuint id )
{
GET_CURRENT_CONTEXT(ctx);
- bind_vertex_array(ctx, id, GL_TRUE);
-}
-
-
-/**
- * Bind a new array.
- *
- * \todo
- * The binding could be done more efficiently by comparing the non-NULL
- * pointers in the old and new objects. The only arrays that are "dirty" are
- * the ones that are non-NULL in either object.
- */
-void GLAPIENTRY
-_mesa_BindVertexArrayAPPLE( GLuint id )
-{
- GET_CURRENT_CONTEXT(ctx);
- bind_vertex_array(ctx, id, GL_FALSE);
+ bind_vertex_array(ctx, id);
}
@@ -572,7 +541,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
/**
* Generate a set of unique array object IDs and store them in \c arrays.
- * Helper for _mesa_GenVertexArrays[APPLE]() and _mesa_CreateVertexArrays()
+ * Helper for _mesa_GenVertexArrays() and _mesa_CreateVertexArrays()
* below.
*
* \param n Number of IDs to generate.
@@ -631,18 +600,6 @@ _mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
/**
- * APPLE version of glGenVertexArraysAPPLE()
- * Arrays may live in VBOs or ordinary memory.
- */
-void GLAPIENTRY
-_mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
-{
- GET_CURRENT_CONTEXT(ctx);
- gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArraysAPPLE");
-}
-
-
-/**
* ARB_direct_state_access
* Generates ID's and creates the array objects.
*/