Mesa (master): dri/nouveau: Fix software mipmap generation on 1x1 textures.

Francisco Jerez currojerez at kemper.freedesktop.org
Tue Sep 21 01:07:00 UTC 2010


Module: Mesa
Branch: master
Commit: bf8f24c1c84ab39207301ae5d298850d72e11876
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf8f24c1c84ab39207301ae5d298850d72e11876

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Fri Sep 17 20:58:43 2010 +0200

dri/nouveau: Fix software mipmap generation on 1x1 textures.

---

 src/mesa/drivers/dri/nouveau/nouveau_texture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index b2f6faf..14c7b5f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -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;
 




More information about the mesa-commit mailing list