summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-08-21 07:45:32 +0100
committerJosé Fonseca <[email protected]>2009-08-29 09:21:38 +0100
commitdb35ac36d92545392b76785bf7fca47151f1469c (patch)
tree3e71871f197071c3cba6995891400258f64a6dbf /src/gallium
parent343ccc8dd0d3578aeeb9b635f0933c9f323c7fda (diff)
llvmpipe: Update texture block from format.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 0fad1fcfdfa..1c1e015a326 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -68,6 +68,8 @@ llvmpipe_texture_layout(struct pipe_screen *screen,
unsigned buffer_size = 0;
+ pf_get_block(lpt->base.format, &lpt->base.block);
+
for (level = 0; level <= pt->last_level; level++) {
pt->width[level] = width;
pt->height[level] = height;
@@ -101,6 +103,7 @@ llvmpipe_displaytarget_layout(struct pipe_screen *screen,
unsigned usage = (PIPE_BUFFER_USAGE_CPU_READ_WRITE |
PIPE_BUFFER_USAGE_GPU_READ_WRITE);
+ pf_get_block(lpt->base.format, &lpt->base.block);
lpt->base.nblocksx[0] = pf_get_nblocksx(&lpt->base.block, lpt->base.width[0]);
lpt->base.nblocksy[0] = pf_get_nblocksy(&lpt->base.block, lpt->base.height[0]);