Mesa (master): ac/surface: don't allocate FMASK if there is no graphics
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 30 18:23:04 UTC 2019
Module: Mesa
Branch: master
Commit: 39e638c14e59f6d9dd63998b0df27b49ef11c7db
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=39e638c14e59f6d9dd63998b0df27b49ef11c7db
Author: Marek Olšák <marek.olsak at amd.com>
Date: Fri Sep 13 18:27:46 2019 -0400
ac/surface: don't allocate FMASK if there is no graphics
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
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};
More information about the mesa-commit
mailing list