From: Brian Paul Date: Fri, 10 Aug 2012 16:36:17 +0000 (-0600) Subject: mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base image X-Git-Tag: accepted/2.0alpha-wayland/20121114.171706~501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6b7157550205a0633b4c2cb49a807d581176e21;p=profile%2Fivi%2Fmesa.git 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 --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index aa8ba18..792a92d 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; }