mesa: Set the gl_array_object::ARBsemantics flag at the right time
With 0963990
the flag was only set when Bind created the object. In
all cases where ::ARBsemantics could be true, this path never
happened. Instead, add a _Used flag to track whether a VAO has ever
been bound. On the first Bind, set the _Used flag, and set the
ARBsemantics flag to the correct value.
NOTE: This is a candidate for release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45423
This commit is contained in:
@@ -373,6 +373,10 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save_array_object(ctx, newObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!newObj->_Used) {
|
||||||
/* The "Interactions with APPLE_vertex_array_object" section of the
|
/* The "Interactions with APPLE_vertex_array_object" section of the
|
||||||
* GL_ARB_vertex_array_object spec says:
|
* 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."
|
* BindVertexArrayAPPLE, determines the semantic of the object."
|
||||||
*/
|
*/
|
||||||
newObj->ARBsemantics = genRequired;
|
newObj->ARBsemantics = genRequired;
|
||||||
save_array_object(ctx, newObj);
|
newObj->_Used = GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1631,6 +1631,11 @@ struct gl_array_object
|
|||||||
*/
|
*/
|
||||||
GLboolean ARBsemantics;
|
GLboolean ARBsemantics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Has this array object been bound?
|
||||||
|
*/
|
||||||
|
GLboolean _Used;
|
||||||
|
|
||||||
/** Vertex attribute arrays */
|
/** Vertex attribute arrays */
|
||||||
struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
|
struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user