[Mesa-dev] [PATCH 14/16] mesa: Returns a GL_INVALID_VALUE error if num of texs in glDeleteTextures is negative
Eduardo Lima Mitev
elima at igalia.com
Thu Dec 11 14:34:20 PST 2014
Per GLES3 manual for glDeleteTextures
<https://www.khronos.org/opengles/sdk/docs/man3/html/glDeleteTextures.xhtml>,
GL_INVALID_VALUE is generated if n is negative.
Fixes 1 dEQP test:
* dEQP-GLES3.functional.negative_api.texture.deletetextures
---
src/mesa/main/texobj.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 923cf60..f24bccb 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1201,6 +1201,11 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glDeleteTextures %d\n", n);
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTextures(n)");
+ return;
+ }
+
FLUSH_VERTICES(ctx, 0); /* too complex */
if (!textures)
--
2.1.3
More information about the mesa-dev
mailing list