summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2017-04-22 17:01:15 +1000
committerTimothy Arceri <tarceri@itsqueeze.com>2017-04-26 10:03:06 +1000
commit7927d0378fc72ceff7d0ddcbe7c21756f0e1f4ea (patch)
treead3629327bdf9186f4bdad5561decabfc973d5ea /src
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 <nicolai.haehnle@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/APPLE_vertex_array_object.xml27
-rw-r--r--src/mapi/glapi/gen/Makefile.am1
-rw-r--r--src/mapi/glapi/gen/gl_API.xml2
-rw-r--r--src/mapi/glapi/tests/check_table.cpp2
-rw-r--r--src/mesa/main/arrayobj.c63
-rw-r--r--src/mesa/main/arrayobj.h6
-rw-r--r--src/mesa/main/attrib.c2
-rw-r--r--src/mesa/main/extensions_table.h1
-rw-r--r--src/mesa/main/get_hash_params.py4
-rw-r--r--src/mesa/main/mtypes.h9
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp2
11 files changed, 19 insertions, 100 deletions
diff --git a/src/mapi/glapi/gen/APPLE_vertex_array_object.xml b/src/mapi/glapi/gen/APPLE_vertex_array_object.xml
deleted file mode 100644
index 7312f9b35f0..00000000000
--- a/src/mapi/glapi/gen/APPLE_vertex_array_object.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
-
-<OpenGLAPI>
-<category name="GL_APPLE_vertex_array_object" number="273">
- <enum name="VERTEX_ARRAY_BINDING_APPLE" value="0x85B5"/>
-
- <function name="BindVertexArrayAPPLE" deprecated="3.1">
- <param name="array" type="GLuint"/>
- </function>
-
- <function name="DeleteVertexArraysAPPLE" alias="DeleteVertexArrays">
- <param name="n" type="GLsizei"/>
- <param name="arrays" type="const GLuint *"/>
- </function>
-
- <function name="GenVertexArraysAPPLE" deprecated="3.1">
- <param name="n" type="GLsizei"/>
- <param name="arrays" type="GLuint *" count="n" output="true"/>
- </function>
-
- <function name="IsVertexArrayAPPLE" alias="IsVertexArray">
- <param name="array" type="GLuint"/>
- <return type="GLboolean"/>
- </function>
-</category>
-</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index c793067d77f..a7e82d65afc 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -189,7 +189,6 @@ API_XML = \
AMD_performance_monitor.xml \
ARB_vertex_type_2_10_10_10_rev.xml \
APPLE_object_purgeable.xml \
- APPLE_vertex_array_object.xml \
EXT_draw_buffers2.xml \
EXT_framebuffer_object.xml \
EXT_gpu_shader4.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 522d2e5e80b..d19cfd29e45 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -12519,7 +12519,7 @@
</category>
<xi:include href="APPLE_object_purgeable.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<xi:include href="APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<!-- Extension number 273 obsolete APPLE_vertex_array_object. -->
<category name="GL_APPLE_ycbcr_422" number="275">
<enum name="YCBCR_422_APPLE" value="0x85B9"/>
diff --git a/src/mapi/glapi/tests/check_table.cpp b/src/mapi/glapi/tests/check_table.cpp
index 09bf4f3585c..a1041bcea22 100644
--- a/src/mapi/glapi/tests/check_table.cpp
+++ b/src/mapi/glapi/tests/check_table.cpp
@@ -1404,9 +1404,7 @@ const struct name_offset known_dispatch[] = {
{ "glPointParameteri", _O(PointParameteri) },
{ "glPointParameteriv", _O(PointParameteriv) },
{ "glActiveStencilFaceEXT", _O(ActiveStencilFaceEXT) },
- { "glBindVertexArrayAPPLE", _O(BindVertexArrayAPPLE) },
{ "glDeleteVertexArrays", _O(DeleteVertexArrays) },
- { "glGenVertexArraysAPPLE", _O(GenVertexArraysAPPLE) },
{ "glIsVertexArray", _O(IsVertexArray) },
{ "glGetProgramNamedParameterdvNV", _O(GetProgramNamedParameterdvNV) },
{ "glGetProgramNamedParameterfvNV", _O(GetProgramNamedParameterfvNV) },
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.
*/
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 830502e23a9..17949685775 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -35,7 +35,7 @@ struct gl_context;
/**
* \file arrayobj.h
- * Functions for the GL_APPLE_vertex_array_object extension.
+ * Functions for the GL_ARB_vertex_array_object extension.
*
* \author Ian Romanick <idr@us.ibm.com>
* \author Brian Paul
@@ -96,14 +96,10 @@ _mesa_all_buffers_are_unmapped(const struct gl_vertex_array_object *vao);
void GLAPIENTRY _mesa_BindVertexArray( GLuint id );
-void GLAPIENTRY _mesa_BindVertexArrayAPPLE( GLuint id );
-
void GLAPIENTRY _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids);
void GLAPIENTRY _mesa_GenVertexArrays(GLsizei n, GLuint *arrays);
-void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer);
-
void GLAPIENTRY _mesa_CreateVertexArrays(GLsizei n, GLuint *arrays);
GLboolean GLAPIENTRY _mesa_IsVertexArray( GLuint id );
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 8e738c91c8f..87d327621df 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1575,7 +1575,7 @@ restore_array_attrib(struct gl_context *ctx,
if (arb_vao && !_mesa_IsVertexArray(src->VAO->Name))
return;
- _mesa_BindVertexArrayAPPLE(src->VAO->Name);
+ _mesa_BindVertexArray(src->VAO->Name);
/* Restore or recreate the buffer objects by the names ... */
if (!arb_vao
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index dc735c5ead9..528f7308b0e 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -26,7 +26,6 @@ EXT(ANGLE_texture_compression_dxt5 , ANGLE_texture_compression_dxt
EXT(APPLE_object_purgeable , APPLE_object_purgeable , GLL, GLC, x , x , 2006)
EXT(APPLE_packed_pixels , dummy_true , GLL, x , x , x , 2002)
EXT(APPLE_texture_max_level , dummy_true , x , x , ES1, ES2, 2009)
-EXT(APPLE_vertex_array_object , dummy_true , GLL, x , x , x , 2002)
EXT(ARB_ES2_compatibility , ARB_ES2_compatibility , GLL, GLC, x , x , 2009)
EXT(ARB_ES3_1_compatibility , ARB_ES3_1_compatibility , x , GLC, x , x , 2014)
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index f6ffb4c84fe..58d428df1a8 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -119,8 +119,8 @@ descriptor=[
# GLSL:
[ "MAX_CLIP_PLANES", "CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA" ],
-# GL_{APPLE,ARB,OES}_vertex_array_object
- [ "VERTEX_ARRAY_BINDING_APPLE", "ARRAY_INT(Name), NO_EXTRA" ],
+# GL_{ARB,OES}_vertex_array_object
+ [ "VERTEX_ARRAY_BINDING", "ARRAY_INT(Name), NO_EXTRA" ],
# GL_EXT_texture_filter_anisotropic
[ "MAX_TEXTURE_MAX_ANISOTROPY_EXT", "CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), extra_EXT_texture_filter_anisotropic" ],
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b3711ba256c..2e3a423ff57 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1496,9 +1496,8 @@ struct gl_vertex_buffer_binding
/**
- * A representation of "Vertex Array Objects" (VAOs) from OpenGL 3.1+,
- * GL_ARB_vertex_array_object, or the original GL_APPLE_vertex_array_object
- * extension.
+ * A representation of "Vertex Array Objects" (VAOs) from OpenGL 3.1+ /
+ * the GL_ARB_vertex_array_object extension.
*/
struct gl_vertex_array_object
{
@@ -1588,7 +1587,7 @@ typedef enum
*/
struct gl_array_attrib
{
- /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
+ /** Currently bound array object. */
struct gl_vertex_array_object *VAO;
/** The default vertex array object */
@@ -1597,7 +1596,7 @@ struct gl_array_attrib
/** The last VAO accessed by a DSA function */
struct gl_vertex_array_object *LastLookedUpVAO;
- /** Array objects (GL_ARB/APPLE_vertex_array_object) */
+ /** Array objects (GL_ARB_vertex_array_object) */
struct _mesa_HashTable *Objects;
GLint ActiveTexture; /**< Client Active Texture */
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 12a9ee7bae1..b33043ed28b 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -969,8 +969,6 @@ const struct function common_desktop_functions_possible[] = {
};
const struct function gl_compatibility_functions_possible[] = {
- { "glBindVertexArrayAPPLE", 10, -1 },
- { "glGenVertexArraysAPPLE", 10, -1 },
{ "glBindRenderbufferEXT", 10, -1 },
{ "glBindFramebufferEXT", 10, -1 },
{ "glNewList", 10, _gloffset_NewList },