diff options
author | Marek Olšák <[email protected]> | 2019-12-20 16:19:54 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2019-12-20 22:57:08 +0000 |
commit | 7d65614422736de32214fc28b0054692f4e5e48f (patch) | |
tree | e9f1d2e20c50e5c38a7166a6aa70efd492a870e2 /src/amd | |
parent | 3e1e4ad13da1581f11b833fba021aaf209c02fff (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3187>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_surface.c | 1 |
1 files changed, 1 insertions, 0 deletions
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}; |