From: Ben Skeggs Date: Fri, 15 Feb 2008 02:54:07 +0000 (+1100) Subject: nv30: fix build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d13f55d2c8483148f0a8786a50daf6e890690a3;p=mesa.git nv30: fix build --- diff --git a/src/mesa/pipe/nv30/nv30_fragtex.c b/src/mesa/pipe/nv30/nv30_fragtex.c index e75b1f7f28b..575f968cc53 100644 --- a/src/mesa/pipe/nv30/nv30_fragtex.c +++ b/src/mesa/pipe/nv30/nv30_fragtex.c @@ -95,7 +95,7 @@ nv30_fragtex_build(struct nv30_context *nv30, int unit) } txf = tf->format << 8; - txf |= (pt->last_level - pt->first_level + 1) << 16; + txf |= (pt->last_level + 1) << 16; txf |= log2i(pt->width[0]) << 20; txf |= log2i(pt->height[0]) << 24; txf |= log2i(pt->depth[0]) << 28; diff --git a/src/mesa/pipe/nv30/nv30_miptree.c b/src/mesa/pipe/nv30/nv30_miptree.c index 75e9b993c16..475f1be8adf 100644 --- a/src/mesa/pipe/nv30/nv30_miptree.c +++ b/src/mesa/pipe/nv30/nv30_miptree.c @@ -23,7 +23,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt) nr_faces = 1; } - for (l = pt->first_level; l <= pt->last_level; l++) { + for (l = 0; l <= pt->last_level; l++) { pt->width[l] = width; pt->height[l] = height; pt->depth[l] = depth; @@ -44,7 +44,7 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt) } for (f = 0; f < nr_faces; f++) { - for (l = pt->first_level; l <= pt->last_level; l++) { + for (l = 0; l <= pt->last_level; l++) { nv30mt->level[l].image_offset[f] = offset; offset += nv30mt->level[l].pitch * pt->height[l]; } @@ -88,7 +88,7 @@ nv30_miptree_release(struct pipe_context *pipe, struct pipe_texture **pt) int l; pipe_buffer_reference(ws, &nv30mt->buffer, NULL); - for (l = mt->first_level; l <= mt->last_level; l++) { + for (l = 0; l <= mt->last_level; l++) { if (nv30mt->level[l].image_offset) free(nv30mt->level[l].image_offset); }