diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-10-05 12:31:51 +0200 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-10-05 12:31:51 +0200 |
commit | 43750f1575e366e2a92b71bffceee90d7f1a2b3e (patch) | |
tree | 07afbccb50ad59058ee95d6db3538375d7d51ead /src/mesa | |
parent | 3856c3cc46813ad96ae6f02dec19460193d986ac (diff) | |
download | external_mesa3d-43750f1575e366e2a92b71bffceee90d7f1a2b3e.zip external_mesa3d-43750f1575e366e2a92b71bffceee90d7f1a2b3e.tar.gz external_mesa3d-43750f1575e366e2a92b71bffceee90d7f1a2b3e.tar.bz2 |
Use _mesa_select_tex_image() rather than hardcoding face 0.
Fixes crash loading a map in sauerbraten with
hwmipmap 1
in ~/.sauerbraten/config.cfg.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mipmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 4d3e625..c3928fa 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1501,8 +1501,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, GLuint comps; ASSERT(texObj); - /* XXX choose cube map face here??? */ - srcImage = texObj->Image[0][texObj->BaseLevel]; + srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel); ASSERT(srcImage); maxLevels = _mesa_max_texture_levels(ctx, texObj->Target); |