From 1738a6973deb03f33a71c9527594727cb8bb64b4 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 7 Nov 2012 07:53:41 +0100 Subject: xserver mesa xkbcomp git update 7 nov 2012 xserver: 011f8458805e443ac9130865d2840a929a00cabf xkbcomp: bd1103ef3cfef9cfed645566f944a69e7ca568b4 mesa: f42518962a08ce927e4ddd233d19d2661e135834 --- mesalib/src/mesa/main/fbobject.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mesalib/src/mesa/main/fbobject.c') diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index fc5681ccc..0758d5557 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -2059,7 +2059,8 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, } else if ((texObj->Target == GL_TEXTURE_1D_ARRAY_EXT) || (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT)) { - if (zoffset < 0 || zoffset >= ctx->Const.MaxArrayTextureLayers) { + if (zoffset < 0 || + zoffset >= (GLint) ctx->Const.MaxArrayTextureLayers) { _mesa_error(ctx, GL_INVALID_VALUE, "glFramebufferTexture%sEXT(layer)", caller); return; @@ -2637,6 +2638,15 @@ _mesa_GenerateMipmapEXT(GLenum target) return; } + if (_mesa_is_enum_format_integer(srcImage->InternalFormat) || + _mesa_is_depthstencil_format(srcImage->InternalFormat) || + _mesa_is_stencil_format(srcImage->InternalFormat)) { + _mesa_unlock_texture(ctx, texObj); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGenerateMipmap(invalid internal format)"); + return; + } + if (target == GL_TEXTURE_CUBE_MAP) { GLuint face; for (face = 0; face < 6; face++) @@ -3142,7 +3152,7 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments, case GL_COLOR_ATTACHMENT13: case GL_COLOR_ATTACHMENT14: case GL_COLOR_ATTACHMENT15: { - const int k = attachments[i] - GL_COLOR_ATTACHMENT0; + unsigned k = attachments[i] - GL_COLOR_ATTACHMENT0; if (k >= ctx->Const.MaxColorAttachments) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(attachment >= max. color attachments)", name); -- cgit v1.2.3