From 7d65614422736de32214fc28b0054692f4e5e48f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 20 Dec 2019 16:19:54 -0500 Subject: [PATCH] ac/surface: fix an assertion failure on gfx9 in CMASK computation addrlib only allows the 2D resource type with CMASK. Fixes: 69ea473eeb9 "amd/addrlib: update to the latest version" Reviewed-by: Dave Airlie Reviewed-by: Bas Nieuwenhuizen Tested-by: Marge Bot Part-of: --- src/amd/common/ac_surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 09f2bb75ea0..81c77e280ae 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -1352,6 +1352,7 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, /* CMASK -- on GFX10 only for FMASK */ if (in->swizzleMode != ADDR_SW_LINEAR && + in->resourceType == ADDR_RSRC_TEX_2D && ((info->chip_class <= GFX9 && in->numSamples == 1) || (surf->fmask_size && in->numSamples >= 2))) { ADDR2_COMPUTE_CMASK_INFO_INPUT cin = {0}; -- 2.30.2