projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fea189d
)
llvmpipe: fix texture image size calculation
author
Brian Paul
<brianp@vmware.com>
Tue, 11 May 2010 17:48:35 +0000
(11:48 -0600)
committer
Brian Paul
<brianp@vmware.com>
Tue, 11 May 2010 17:52:06 +0000
(11:52 -0600)
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!
src/gallium/drivers/llvmpipe/lp_texture.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_texture.c
b/src/gallium/drivers/llvmpipe/lp_texture.c
index 9129fa46baf1d6998dc1f405c04dce19eab1d469..4eed687ac714b48519a2d3a5ae66492266a0089c 100644
(file)
--- 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) */