radeon: fix allocation of MSAA surfaces on r600-r700
authorMarek Olšák <maraeo@gmail.com>
Sun, 19 Aug 2012 01:54:34 +0000 (03:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 24 Aug 2012 14:51:14 +0000 (16:51 +0200)
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
radeon/radeon_surface.c

index 892dca6426717fe6e101fd4c876429ef7d75eb9a..98f4aaf5c1b5ebb0ad2c754a5f12bcde5318411a 100644 (file)
@@ -165,7 +165,7 @@ static void surf_minify(struct radeon_surface *surf,
     surf->level[level].nblk_z  = ALIGN(surf->level[level].nblk_z, zalign);
 
     surf->level[level].offset = offset;
-    surf->level[level].pitch_bytes = surf->level[level].nblk_x * surf->bpe;
+    surf->level[level].pitch_bytes = surf->level[level].nblk_x * surf->bpe * surf->nsamples;
     surf->level[level].slice_size = surf->level[level].pitch_bytes * surf->level[level].nblk_y;
 
     surf->bo_size = offset + surf->level[level].slice_size * surf->level[level].nblk_z * surf->array_size;