llvmpipe: Update texture block from format.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 21 Aug 2009 06:45:32 +0000 (07:45 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:38 +0000 (09:21 +0100)
src/gallium/drivers/llvmpipe/lp_texture.c

index 0fad1fcfdfab65a5b7e5b783b82dbc049161907f..1c1e015a32675372eb1fc972abd5fcd181798b4e 100644 (file)
@@ -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]);