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>
This commit is contained in:
Marek Olšák
2024-10-30 13:43:13 -04:00
committed by Marge Bot
parent 755fb7a262
commit 5d09374ffe

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 ||
ptex->bind & PIPE_BIND_PROTECTED ||
sscreen->debug_flags & DBG(NO_DCC) ||