dri/nouveau: Fix software mipmap generation on 1x1 textures.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 17 Sep 2010 18:58:43 +0000 (20:58 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 21 Sep 2010 01:04:04 +0000 (03:04 +0200)
src/mesa/drivers/dri/nouveau/nouveau_texture.c

index b2f6faf1e125f9d1c66ec0d073acef58c1f0a00d..14c7b5f64b77c147855e528e75594778e4c958cf 100644 (file)
@@ -603,7 +603,7 @@ store_mipmap(GLcontext *ctx, GLenum target, int first, int last,
                .BufferObj = ctx->Shared->NullBufferObj,
                .Alignment = 1
        };
-       GLenum format = t->Image[0][first]->TexFormat;
+       GLenum format = t->Image[0][t->BaseLevel]->TexFormat;
        unsigned base_format, type, comps;
        int i;