From: Marek Olšák Date: Fri, 13 Sep 2019 22:27:46 +0000 (-0400) Subject: ac/surface: don't allocate FMASK if there is no graphics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39e638c14e59f6d9dd63998b0df27b49ef11c7db;p=mesa.git ac/surface: don't allocate FMASK if there is no graphics Reviewed-by: Samuel Pitoiset --- 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};