mesa: drop APPLE_vertex_array_object support

Shared context support for VAOs was dropped in 0b2750620b.

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>
This commit is contained in:
Timothy Arceri 2017-04-22 17:01:15 +10:00
parent 7b9963a28f
commit 7927d0378f
12 changed files with 20 additions and 101 deletions

View File

@ -58,7 +58,7 @@ TBD
<h2>Changes</h2>
<ul>
TBD
<li>GL_APPLE_vertex_array_object support removed.</li>
</ul>
</div>

View File

@ -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>

View File

@ -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 \

View File

@ -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"/>

View File

@ -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) },

View File

@ -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.
@ -630,18 +599,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.

View File

@ -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 );

View File

@ -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

View File

@ -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)

View File

@ -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" ],

View File

@ -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 */

View File

@ -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 },