aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-07 07:53:41 +0100
committermarha <marha@users.sourceforge.net>2012-11-07 07:53:41 +0100
commit1738a6973deb03f33a71c9527594727cb8bb64b4 (patch)
tree813603d381b5536ef7a1e2ffd3a137c4bc0623f7 /mesalib/src/mesa/main/fbobject.c
parent1cc98f5a48924d750fbef7ea6b05a1ba49c28589 (diff)
downloadvcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.tar.gz
vcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.tar.bz2
vcxsrv-1738a6973deb03f33a71c9527594727cb8bb64b4.zip
xserver mesa xkbcomp git update 7 nov 2012
xserver: 011f8458805e443ac9130865d2840a929a00cabf xkbcomp: bd1103ef3cfef9cfed645566f944a69e7ca568b4 mesa: f42518962a08ce927e4ddd233d19d2661e135834
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c14
1 files changed, 12 insertions, 2 deletions
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);