radeonsi: hide real modifier export behind AMD_DEBUG
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Some applications are not ready to handle multi plane
modifiers.

User who want this feature can use AMD_DEBUG=export_modifier
to enable it again.

Fixes: 0a266f0256 ("radeonsi: really support eglExportDMABUFImageQueryMESA")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13917
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37433>
This commit is contained in:
Qiang Yu 2025-09-17 16:31:18 +08:00 committed by Marge Bot
parent 996c0af482
commit 93024ea247
4 changed files with 7 additions and 1 deletions

View file

@ -1786,6 +1786,9 @@ RadeonSI driver environment variables
Disable tier3 for video decode.
``noenctier2``
Disable tier2 for video encode.
``export_modifier``
Export real modifier instead of DRM_FORMAT_MOD_INVALID to user. For example
by eglExportDMABUFImageQueryMESA.
r600 driver environment variables
---------------------------------

View file

@ -84,6 +84,7 @@ static const struct debug_named_value radeonsi_debug_options[] = {
{"tmz", DBG(TMZ), "Force allocation of scanout/depth/stencil buffer as encrypted"},
{"sqtt", DBG(SQTT), "Enable SQTT"},
{"export_modifier", DBG(EXPORT_MODIFIER), "Export real modifier instead of DRM_FORMAT_MOD_INVALID"},
DEBUG_NAMED_VALUE_END /* must be last */
};

View file

@ -212,6 +212,7 @@ enum
DBG_TMZ,
DBG_SQTT,
DBG_EXPORT_MODIFIER,
DBG_COUNT
};

View file

@ -674,7 +674,8 @@ static bool si_resource_get_param(struct pipe_screen *screen, struct pipe_contex
* PIPE_RESOURCE_PARAM_MODIFIER queries.
*/
if ((param == PIPE_RESOURCE_PARAM_NPLANES || param == PIPE_RESOURCE_PARAM_MODIFIER) &&
resource->target != PIPE_BUFFER)
resource->target != PIPE_BUFFER &&
(sscreen->debug_flags & DBG(EXPORT_MODIFIER)))
ac_compute_surface_modifier(&sscreen->info, &tex->surface, resource->nr_samples);
switch (param) {