radeonsi: reject modifiers with DCC when NO_EXPORTED_DCC is used

Otherwise AMD_DEBUG=noexporteddcc will be ignored when modifier are
used.
Similarly to AMD_DEBUG=nodcc handling, this makes the application
unable to import buffers with DCC as well - the alternative would be
to implement the filtering only in the texture creation path, so in
the si_modifier_supports_resource function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2024-07-19 08:42:32 +02:00 committed by Marge Bot
parent 0c868aa94a
commit f12ccea6c7

View file

@ -1529,7 +1529,7 @@ static void si_query_dmabuf_modifiers(struct pipe_screen *screen,
unsigned ac_mod_count = max;
ac_get_supported_modifiers(&sscreen->info, &(struct ac_modifier_options) {
.dcc = !(sscreen->debug_flags & DBG(NO_DCC)),
.dcc = !(sscreen->debug_flags & (DBG(NO_DCC) | DBG(NO_EXPORTED_DCC))),
/* Do not support DCC with retiling yet. This needs explicit
* resource flushes, but the app has no way to promise doing
* flushes with modifiers. */