Mesa (staging/18.2): ac/surface: fix CMASK fast clear for NPOT textures with mipmapping on SI/CI/VI
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 30 12:59:02 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: ccf5b1284a53c7d9e1e5a5cfb56e94e733c166e6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ccf5b1284a53c7d9e1e5a5cfb56e94e733c166e6
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Aug 28 14:39:09 2018 -0400
ac/surface: fix CMASK fast clear for NPOT textures with mipmapping on SI/CI/VI
This fixes VM faults and corruption.
Cc: 18.1 18.2 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 1e40f6948310be07abb2d0198e6602769892cdac)
---
src/amd/common/ac_surface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index 2f4f0f8884..94723dc9c0 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -588,8 +588,8 @@ void ac_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. */
More information about the mesa-commit
mailing list