mt->pitch must be at least 16 because of 64-byte alignment in sp_region.c (fix that...
authorBrian <brian.paul@tungstengraphics.com>
Sat, 11 Aug 2007 20:19:04 +0000 (21:19 +0100)
committerBrian <brian.paul@tungstengraphics.com>
Sat, 11 Aug 2007 20:19:04 +0000 (21:19 +0100)
src/mesa/pipe/softpipe/sp_tex_layout.c

index 37969c84de76633c45e38e46207febfbd7150de8..bd5f5e930da0439a8b3a7d0f495af181523e0cff 100644 (file)
@@ -116,6 +116,12 @@ sp_miptree_layout_2d( struct pipe_mipmap_tree *mt )
    GLuint height = mt->height0;
 
    mt->pitch = mt->width0;
+   /* XXX FIX THIS:
+    * we use alignment=64 bytes in sp_region_alloc(). If we change
+    * that, change this too.
+    */
+   if (mt->pitch < 16)
+      mt->pitch = 16;
 
    /* May need to adjust pitch to accomodate the placement of
     * the 2nd mipmap.  This occurs when the alignment