From 39e638c14e59f6d9dd63998b0df27b49ef11c7db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 13 Sep 2019 18:27:46 -0400 Subject: [PATCH] ac/surface: don't allocate FMASK if there is no graphics Reviewed-by: Samuel Pitoiset --- src/amd/common/ac_surface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 4b0e4f70535..c51c493775e 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -853,7 +853,7 @@ static int gfx6_compute_surface(ADDR_HANDLE addrlib, /* Compute FMASK. */ if (config->info.samples >= 2 && AddrSurfInfoIn.flags.color && - !(surf->flags & RADEON_SURF_NO_FMASK)) { + info->has_graphics && !(surf->flags & RADEON_SURF_NO_FMASK)) { ADDR_COMPUTE_FMASK_INFO_INPUT fin = {0}; ADDR_COMPUTE_FMASK_INFO_OUTPUT fout = {0}; ADDR_TILEINFO fmask_tile_info = {}; @@ -1301,7 +1301,8 @@ static int gfx9_compute_miptree(ADDR_HANDLE addrlib, } /* FMASK */ - if (in->numSamples > 1 && !(surf->flags & RADEON_SURF_NO_FMASK)) { + if (in->numSamples > 1 && info->has_graphics && + !(surf->flags & RADEON_SURF_NO_FMASK)) { ADDR2_COMPUTE_FMASK_INFO_INPUT fin = {0}; ADDR2_COMPUTE_FMASK_INFO_OUTPUT fout = {0}; -- 2.30.2