summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-08-04 10:57:47 +0200
committerMichel Dänzer <[email protected]>2009-08-04 10:57:47 +0200
commit048f988aeb06fa360c6c41eaa50cb96b4b86e34e (patch)
treea84fbb0654cecf2b3fd7b5608e84161aabf339f1 /src/gallium/drivers/r300/r300_texture.c
parentd7430d942f6c7950a92367aeb13b80cf76ccad78 (diff)
r300g: Slightly saner initialization of some texture / transfer fields.
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index daf1647bee8..0164f050961 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -81,13 +81,11 @@ static void r300_setup_miptree(struct r300_texture* tex)
* XXX
* POT, uncompressed, unmippmapped textures can be aligned to 32,
* instead of 64. */
- stride = align(
- (base->nblocksx[i] * base->block.size) / base->block.width,
- 32);
+ stride = align(pf_get_stride(&base->block, base->width[i]), 32);
size = stride * base->nblocksy[i] * base->depth[i];
tex->offset[i] = align(tex->size, 32);
- tex->size += tex->offset[i] + size;
+ tex->size = tex->offset[i] + size;
debug_printf("r300: Texture miptree: Level %d "
"(%dx%dx%d px, pitch %d bytes)\n",