radeonsi/gfx12: fix AMD_DEBUG=nodcc not working

surface->modifier is always 0 here. We should use the parameter instead.

Fixes: 3d05d86d88 (radeonsi/gfx12: add DCC)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31910>
(cherry picked from commit 5d09374ffe)
This commit is contained in:
Marek Olšák 2024-10-30 13:43:13 -04:00 committed by Eric Engestrom
parent c19d4af9d8
commit ee5ae8c717
2 changed files with 2 additions and 2 deletions

View file

@ -1314,7 +1314,7 @@
"description": "radeonsi/gfx12: fix AMD_DEBUG=nodcc not working",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "3d05d86d88eb83b5c4846ea80d8b23a4271d7803",
"notes": null

View file

@ -238,7 +238,7 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
surface->u.gfx9.color.dcc_data_format = ac_get_cb_format(sscreen->info.gfx_level, format);
}
if (surface->modifier == DRM_FORMAT_MOD_INVALID &&
if (modifier == DRM_FORMAT_MOD_INVALID &&
(ptex->bind & PIPE_BIND_CONST_BW ||
sscreen->debug_flags & DBG(NO_DCC) ||
(ptex->bind & PIPE_BIND_SCANOUT && sscreen->debug_flags & DBG(NO_DISPLAY_DCC))))