projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50d6793
)
main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.
author
Laura Ekstrand
<laura@jlekstrand.net>
Fri, 12 Dec 2014 19:02:02 +0000
(11:02 -0800)
committer
Laura Ekstrand
<laura@jlekstrand.net>
Thu, 8 Jan 2015 19:37:30 +0000
(11:37 -0800)
This is in conformance with the OpenGL spec.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/texobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texobj.c
b/src/mesa/main/texobj.c
index 0ff271769e6dde115245fa83cfad8e9f62200fbc..d6e44f24c8c8c65d6ddf0cfc61f499df8c807155 100644
(file)
--- a/
src/mesa/main/texobj.c
+++ b/
src/mesa/main/texobj.c
@@
-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;