summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2008-12-09 16:17:57 +0000
committerAlan Hourihane <[email protected]>2008-12-09 16:17:57 +0000
commit608e14c5b265d331f89959b8e477796ac21c297c (patch)
tree1ba71982c446510a62249fed12666507f11efc00 /src/mesa/main
parentee0735fa2d4b2d2a9eae1f55e8f93f1f57feaf6d (diff)
parenta0d5c3cfe6582f8294154f6877319193458158a2 (diff)
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index dd06327972b..718c97568b5 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1574,9 +1574,17 @@ _mesa_GenerateMipmapEXT(GLenum target)
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
texObj = _mesa_select_tex_object(ctx, texUnit, target);
- /* XXX this might not handle cube maps correctly */
_mesa_lock_texture(ctx, texObj);
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ if (target == GL_TEXTURE_CUBE_MAP) {
+ int face;
+
+ for (face = 0; face < 6; face++)
+ ctx->Driver.GenerateMipmap(ctx,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + face,
+ texObj);
+ } else {
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
_mesa_unlock_texture(ctx, texObj);
}