diff mbox

r600g: fix allocation of MSAA surfaces on r600-r700

Message ID 1345382705-2603-1-git-send-email-maraeo@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marek Olšák Aug. 19, 2012, 1:25 p.m. UTC
---
 radeon/radeon_surface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jerome Glisse Aug. 19, 2012, 5:50 p.m. UTC | #1
On Sun, Aug 19, 2012 at 9:25 AM, Marek Olšák <maraeo@gmail.com> wrote:

Reviewed-by: Jerome Glisse <jglisse@redhat.com>

> ---
>  radeon/radeon_surface.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
> index 892dca6..98f4aaf 100644
> --- a/radeon/radeon_surface.c
> +++ b/radeon/radeon_surface.c
> @@ -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;
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c
index 892dca6..98f4aaf 100644
--- a/radeon/radeon_surface.c
+++ b/radeon/radeon_surface.c
@@ -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;