diff options
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 47ac6306cfe..975063d0d78 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2146,6 +2146,7 @@ _mesa_GenerateMipmapEXT(GLenum target) /* OK, legal value */ break; default: + /* XXX need to implement GL_TEXTURE_1D_ARRAY and GL_TEXTURE_2D_ARRAY */ _mesa_error(ctx, GL_INVALID_ENUM, "glGenerateMipmapEXT(target)"); return; } @@ -2157,6 +2158,13 @@ _mesa_GenerateMipmapEXT(GLenum target) return; } + if (texObj->Target == GL_TEXTURE_CUBE_MAP && + !_mesa_cube_complete(texObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGenerateMipmap(incomplete cube map)"); + return; + } + _mesa_lock_texture(ctx, texObj); if (target == GL_TEXTURE_CUBE_MAP) { GLuint face; |