radeonsi: really support eglExportDMABUFImageQueryMESA

Now it should return explicite modifier and plane number.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31658>
This commit is contained in:
Qiang Yu 2024-10-15 14:48:38 +08:00 committed by Marge Bot
parent f416a52960
commit 0a266f0256

View file

@ -669,6 +669,14 @@ static bool si_resource_get_param(struct pipe_screen *screen, struct pipe_contex
struct si_texture *tex = (struct si_texture *)resource;
struct winsys_handle whandle;
/* Compute texture modifier when needed.
* This allows to return the correct values for the PIPE_RESOURCE_PARAM_NPLANES and
* PIPE_RESOURCE_PARAM_MODIFIER queries.
*/
if ((param == PIPE_RESOURCE_PARAM_NPLANES || param == PIPE_RESOURCE_PARAM_MODIFIER) &&
resource->target != PIPE_BUFFER)
ac_compute_surface_modifier(&sscreen->info, &tex->surface, resource->nr_samples);
switch (param) {
case PIPE_RESOURCE_PARAM_NPLANES:
if (resource->target == PIPE_BUFFER)