From b5a6e63cbdb6a92d3920fdac9367be592d815b4e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Tue, 15 Oct 2024 18:18:37 +0200 Subject: [PATCH] ac/surface: fix determination of gfx12_enable_dcc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For surfaces without a modifier, the surf_size check wasn't necessary, but it was also invalid since surf_size is set later (in gfx12_compute_miptree). Since it's not required anyway, drop this check. Fixes: 060d5dacfd1 ("ac: add gfx12 DCC shared code") Reviewed-by: Marek Olšák Part-of: (cherry picked from commit 5607c7ee4906dad8483c2c6668fceee255ac6ea2) --- .pick_status.json | 2 +- src/amd/common/ac_surface.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 36b25a164fb..adb8a6d8fa1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1014,7 +1014,7 @@ "description": "ac/surface: fix determination of gfx12_enable_dcc", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "060d5dacfd1f1402bad795c37713db04b299f7ea", "notes": null diff --git a/src/amd/common/ac_surface.c b/src/amd/common/ac_surface.c index 13ba37298b2..21c5bcc68ae 100644 --- a/src/amd/common/ac_surface.c +++ b/src/amd/common/ac_surface.c @@ -3247,9 +3247,8 @@ static bool gfx12_compute_surface(struct ac_addrlib *addrlib, const struct radeo (surf->flags & RADEON_SURF_Z_OR_SBUFFER || config->info.samples > 1 || ((supports_display_dcc || !(surf->flags & RADEON_SURF_SCANOUT)) && - /* These two are not strictly necessary. */ - surf->u.gfx9.swizzle_mode != ADDR3_LINEAR && - surf->surf_size >= 4096))); + /* This one is not strictly necessary. */ + surf->u.gfx9.swizzle_mode != ADDR3_LINEAR))); surf->has_stencil = !!(surf->flags & RADEON_SURF_SBUFFER); surf->is_linear = surf->u.gfx9.swizzle_mode == ADDR3_LINEAR;