summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv10/nv10_miptree.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-12-02 16:55:33 +0100
committerRoland Scheidegger <sroland@vmware.com>2009-12-02 16:55:33 +0100
commit94b5c28a98850f42fbcdab9ceda1450279e1e6fd (patch)
treebc0a996594146a991a7079e10daff6263c8f47a4 /src/gallium/drivers/nv10/nv10_miptree.c
parentc78748a5274e58bcbb122923edf81065be9bbe16 (diff)
gallium: adapt nv drivers to interface cleanups
Diffstat (limited to 'src/gallium/drivers/nv10/nv10_miptree.c')
-rw-r--r--src/gallium/drivers/nv10/nv10_miptree.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c
index b2a6c59b74..439beeccc3 100644
--- a/src/gallium/drivers/nv10/nv10_miptree.c
+++ b/src/gallium/drivers/nv10/nv10_miptree.c
@@ -11,7 +11,7 @@ nv10_miptree_layout(struct nv10_miptree *nv10mt)
{
struct pipe_texture *pt = &nv10mt->base;
boolean swizzled = FALSE;
- uint width = pt->width0, height = pt->height0;
+ uint width = pt->width0;
uint offset = 0;
int nr_faces, l, f;
@@ -22,21 +22,16 @@ nv10_miptree_layout(struct nv10_miptree *nv10mt)
}
for (l = 0; l <= pt->last_level; l++) {
-
- pt->nblocksx[l] = pf_get_nblocksx(&pt->block, width);
- pt->nblocksy[l] = pf_get_nblocksy(&pt->block, height);
-
if (swizzled)
- nv10mt->level[l].pitch = pt->nblocksx[l] * pt->block.size;
+ nv10mt->level[l].pitch = pf_get_stride(pt->format, width);
else
- nv10mt->level[l].pitch = pt->nblocksx[0] * pt->block.size;
+ nv10mt->level[l].pitch = pf_get_stride(pt->format, pt->width0);
nv10mt->level[l].pitch = (nv10mt->level[l].pitch + 63) & ~63;
nv10mt->level[l].image_offset =
CALLOC(nr_faces, sizeof(unsigned));
width = u_minify(width, 1);
- height = u_minify(height, 1);
}