llvmpipe: keep texture stride 16byte aligned
authorKeith Whitwell <keithw@vmware.com>
Sun, 23 Aug 2009 11:07:36 +0000 (12:07 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:41 +0000 (09:21 +0100)
Fixes crash when resizing gears window.

src/gallium/drivers/llvmpipe/lp_texture.c

index 18c2362e98d45154513e3cf47777c76845c85a36..169fe87b78efd3591aeabcf8d480e855f8e15b03 100644 (file)
@@ -76,7 +76,7 @@ llvmpipe_texture_layout(struct pipe_screen *screen,
       pt->depth[level] = depth;
       pt->nblocksx[level] = pf_get_nblocksx(&pt->block, width);  
       pt->nblocksy[level] = pf_get_nblocksy(&pt->block, height);  
-      lpt->stride[level] = pt->nblocksx[level]*pt->block.size;
+      lpt->stride[level] = align(pt->nblocksx[level]*pt->block.size, 16);
 
       lpt->level_offset[level] = buffer_size;