From d4e52281aa9c1acc92619736da8b67d8c02ce380 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 28 Aug 2018 14:39:09 -0400 Subject: winsys/radeon: fix CMASK fast clear for NPOT textures with mipmapping on SI/CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 18.2 Tested-by: Dieter Nützel --- src/gallium/winsys/radeon/drm/radeon_drm_surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/winsys') diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c index fda1ba7870e..20cfc86ebe0 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c @@ -257,8 +257,8 @@ static void si_compute_cmask(const struct radeon_info *info, unsigned base_align = num_pipes * pipe_interleave_bytes; - unsigned width = align(config->info.width, cl_width*8); - unsigned height = align(config->info.height, cl_height*8); + unsigned width = align(surf->u.legacy.level[0].nblk_x, cl_width*8); + unsigned height = align(surf->u.legacy.level[0].nblk_y, cl_height*8); unsigned slice_elements = (width * height) / (8*8); /* Each element of CMASK is a nibble. */ -- cgit v1.2.3