softpipe: Compute block size for display targets.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 4 Jul 2008 18:19:56 +0000 (03:19 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Fri, 4 Jul 2008 18:51:25 +0000 (03:51 +0900)
src/gallium/drivers/softpipe/sp_texture.c

index 20ad336b4fa0ee260721a9815e5e6f46cc75e7c5..f775591352b0fab7d1ea05cc96823f94253eded2 100644 (file)
@@ -122,8 +122,10 @@ softpipe_displaytarget_layout(struct pipe_screen *screen,
       
    /* Now extract the goodies: 
     */
-   spt->buffer = surf.buffer;
+   spt->base.nblocksx[0] = pf_get_nblocksx(&spt->base.block, spt->base.width[0]);  
+   spt->base.nblocksy[0] = pf_get_nblocksy(&spt->base.block, spt->base.height[0]);  
    spt->stride[0] = surf.stride;
+   spt->buffer = surf.buffer;
 
    return spt->buffer != NULL;
 }