summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-08-10 10:36:17 -0600
committerBrian Paul <brianp@vmware.com>2012-08-16 09:11:14 -0600
commitf6b7157550205a0633b4c2cb49a807d581176e21 (patch)
tree2c9d18a1bfbfc4d4c8e8d4e39f30a698cd39e09f
parentd663a557fd27d7c238248e19f22f2e6b05f03030 (diff)
downloadmesa-f6b7157550205a0633b4c2cb49a807d581176e21.tar.gz
mesa-f6b7157550205a0633b4c2cb49a807d581176e21.tar.xz
mesa-f6b7157550205a0633b4c2cb49a807d581176e21.zip
mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base image
This seems to be expected by the WebGL texture-mips test. The error makes sense, but I haven't found (yet) any OpenGL documentation specifying this error condition. See http://bugs.freedesktop.org/show_bug.cgi?id=44912 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <jfonseca@vmware.com>
-rw-r--r--src/mesa/main/fbobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index aa8ba1882c..792a92da35 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2564,6 +2564,8 @@ _mesa_GenerateMipmapEXT(GLenum target)
srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel);
if (!srcImage) {
_mesa_unlock_texture(ctx, texObj);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGenerateMipmap(zero size base image)");
return;
}