summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-11 11:48:35 -0600
committerBrian Paul <[email protected]>2010-05-11 11:52:06 -0600
commit08e443a1c8218e43dcd953859843d95d9020a892 (patch)
treede7399ea845c7aa81a0e6ed842570fe488109795 /src/gallium/drivers/llvmpipe
parentfea189d6e4f0c09eb0d005c5fa06db43b56e2e37 (diff)
llvmpipe: fix texture image size calculation
We were allocating too much memory for linear layouts. The block_size factor is already included in the row_stride and should not be used in the img_stride calculation. This is typically a 4x savings!
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 9129fa46baf..4eed687ac71 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -134,7 +134,7 @@ llvmpipe_texture_layout(struct llvmpipe_screen *screen,
lpr->row_stride[level] = align(nblocksx * block_size, 16);
- lpr->img_stride[level] = lpr->row_stride[level] * nblocksy * block_size;
+ lpr->img_stride[level] = lpr->row_stride[level] * nblocksy;
}
/* Size of the image in tiles (for tiled layout) */