main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.

This is in conformance with the OpenGL spec.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Laura Ekstrand 2014-12-12 11:02:02 -08:00
parent 50d679381d
commit 2546d901be

View file

@ -1403,6 +1403,11 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
FLUSH_VERTICES(ctx, 0); /* too complex */
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTextures(n)");
return;
}
if (!textures)
return;