summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2024-04-15 03:29:15 -0400
committerMarge Bot <emma+marge@anholt.net>2024-04-30 06:47:20 +0000
commit33f642aa09a82a3a7ba9b6b583d615bfa28f78c4 (patch)
treeadc012731aedd7d4efb3af6592ace31c0f5879cf
parente05aec3fcd86613abcb7b0618f1b5f49b8ce0f4e (diff)
ac/surface: disable DCC for 3D textures on gfx9 to improve performance
This improves Viewperf/Energy perf by 60% on Vega10. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28846>
-rw-r--r--src/amd/common/ac_surface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c
index f9acfd46b68..2caee2f50e3 100644
--- a/src/amd/common/ac_surface.c
+++ b/src/amd/common/ac_surface.c
@@ -2018,6 +2018,7 @@ static int gfx9_compute_miptree(struct ac_addrlib *addrlib, const struct radeon_
use_dcc = ac_modifier_has_dcc(surf->modifier);
} else {
use_dcc = info->has_graphics && !(surf->flags & RADEON_SURF_DISABLE_DCC) && !compressed &&
+ !config->is_3d &&
is_dcc_supported_by_CB(info, in->swizzleMode) &&
(!in->flags.display ||
gfx9_is_dcc_supported_by_DCN(info, config, surf, !in->flags.metaRbUnaligned,