radeon: don't overallocate stencil by 4 on SI and CIK
PATCH 1/1 radeon: don't overallocate stencil by 4 on SI and CIK
From: Michel Dänzer <[email protected]>
Signed-off-by Marek Olšák <[email protected]>
--- radeon/radeon_surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
radeon/radeon_surface.c +3 -2
@@ -1435,16 +1435,17 @@ static void si_surf_minify(struct radeon_surface *surf,*/ if (level ==0 && surf->last_level ==0 )/* Non-mipmap pitch padded to slice alignment */ +/* Using just bpe here breaks stencil blitting; surf->bpe works. */ xalign =MAX2 (xalign, slice_align / surf->bpe);else if (surflevel->mode ==RADEON_SURF_MODE_LINEAR_ALIGNED )/* Small rows evenly distributed across slice */ - xalign =MAX2 (xalign, slice_align / surf->bpe / surflevel->nblk_y); + xalign =MAX2 (xalign, slice_align / bpe / surflevel->nblk_y); surflevel->nblk_x =ALIGN (surflevel->nblk_x, xalign); surflevel->nblk_z =ALIGN (surflevel->nblk_z, zalign); surflevel->offset = offset; - surflevel->pitch_bytes = surflevel->nblk_x * surf->bpe * surf->nsamples; + surflevel->pitch_bytes = surflevel->nblk_x * bpe * surf->nsamples; surflevel->slice_size =ALIGN (surflevel->pitch_bytes * surflevel->nblk_y, slice_align); surf->bo_size = offset + surflevel->slice_size * surflevel->nblk_z * surf->array_size;
Signature · 6 lines
1.8.3.2 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Marek Olšák
From: Michel Dänzer <[email protected]>
Signed-off-by Marek Olšák <[email protected]>
Reviewed-and-Tested-by Michel Dänzer <[email protected]>
Signature · 7 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel