mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 22:30:12 +01:00
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:
parent
f416a52960
commit
0a266f0256
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue