mt->pitch must be at least 16 because of 64-byte alignment in sp_region.c (fix that someday)

This commit is contained in:
Brian
2007-08-11 21:19:04 +01:00
parent e209ca866d
commit 5d42fdb9b7
+6
View 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