Commit 56eacf05 by Nicolas Capens Committed by Nicolas Capens

Silently ignore attempts to delete default VAO.

The spec for glDeleteVertexArrays states that "Unused names in arrays are silently ignored, as is the value zero." b/116699321 Change-Id: I7cca0336dd9841b360f8fa20f6c0ac9677ec3ce1 Reviewed-on: https://swiftshader-review.googlesource.com/21048Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 8c5ca8d1
......@@ -1179,7 +1179,7 @@ void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{
for(int i = 0; i < n; i++)
{
if(framebuffers[i] != 0)
if(framebuffers[i] != 0) // Attempts to delete default framebuffer silently ignored.
{
context->deleteFramebuffer(framebuffers[i]);
}
......@@ -1300,7 +1300,7 @@ void DeleteTextures(GLsizei n, const GLuint* textures)
{
for(int i = 0; i < n; i++)
{
if(textures[i] != 0)
if(textures[i] != 0) // Attempts to delete default texture silently ignored.
{
context->deleteTexture(textures[i]);
}
......
......@@ -1499,7 +1499,10 @@ GL_APICALL void GL_APIENTRY glDeleteVertexArrays(GLsizei n, const GLuint *arrays
{
for(int i = 0; i < n; i++)
{
context->deleteVertexArray(arrays[i]);
if(arrays[i] != 0) // Attempts to delete default vertex array silently ignored.
{
context->deleteVertexArray(arrays[i]);
}
}
}
}
......@@ -3374,7 +3377,7 @@ GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks(GLsizei n, const GLuint *
{
for(int i = 0; i < n; i++)
{
if(ids[i] != 0)
if(ids[i] != 0) // Attempts to delete default transform feedback silently ignored.
{
es2::TransformFeedback *transformFeedbackObject = context->getTransformFeedback(ids[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment