summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_miptree.c
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2009-02-11 11:52:32 -0500
committerYounes Manton <[email protected]>2009-02-11 11:58:35 -0500
commit36b83f519864e20a8ddd69b7ced55e89624a390a (patch)
tree0f8e6f2c3ff3f37d9710996e0d1e2f33ec1bf196 /src/gallium/drivers/nv30/nv30_miptree.c
parent874f364e9ea3a03d29ae4b6e1c7e2843ef8b9e79 (diff)
nouveau: 1xN, Nx1 levels of a swizzled mip tree shouldn't be aligned.
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_miptree.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index fe13f50ebb3..510c94d4e64 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -50,7 +50,8 @@ nv30_miptree_layout(struct nv30_miptree *nv30mt)
for (l = 0; l < pt->last_level; l++) {
nv30mt->level[l].image_offset[f] = offset;
- if (!(pt->tex_usage & NOUVEAU_TEXTURE_USAGE_LINEAR))
+ if (!(pt->tex_usage & NOUVEAU_TEXTURE_USAGE_LINEAR) &&
+ pt->width[l + 1] > 1 && pt->height[l + 1] > 1)
offset += align(nv30mt->level[l].pitch * pt->height[l], 64);
else
offset += nv30mt->level[l].pitch * pt->height[l];