summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-18 16:25:16 +0100
committerBrian <brian.paul@tungstengraphics.com>2007-08-18 16:25:16 +0100
commit53cf87be1b93c760228e6a9af8115d2a9ff99337 (patch)
tree8cf9c96b522d057f963d541680d84d6abc93c9ab
parent95e84a09ce3f35f59465be28026e83c1bc40ae8a (diff)
some fixes for compressed cube maps (bug 11986)
-rw-r--r--src/mesa/main/mipmap.c7
-rw-r--r--src/mesa/main/teximage.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 9f3db22b75..a9260c847b 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 7.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -957,7 +957,8 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
GLint components, size;
GLchan *dst;
- assert(texObj->Target == GL_TEXTURE_2D);
+ assert(texObj->Target == GL_TEXTURE_2D ||
+ texObj->Target == GL_TEXTURE_CUBE_MAP_ARB);
if (srcImage->_BaseFormat == GL_RGB) {
convertFormat = &_mesa_texformat_rgb;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 56322f87af..1bc52d220a 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1998,7 +1998,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
}
if (is_compressed_format(ctx, internalFormat)) {
- if (target != GL_TEXTURE_2D) {
+ if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexImage%d(target)", dimensions);
return GL_TRUE;
@@ -2181,7 +2181,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
}
if (teximage->IsCompressed) {
- if (target != GL_TEXTURE_2D) {
+ if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glCopyTexSubImage%d(target)", dimensions);
return GL_TRUE;