panfrost: fix lowered multi plane resource offset/stride param get

EGL is going to really export each plane's offset/stride, panfrost
need to fix for passing the piglit test:
  spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13853
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37247>
This commit is contained in:
Qiang Yu
2025-09-09 14:36:37 +08:00
committed by Marge Bot
parent 95579b7af6
commit ea5e190b91

View File

@@ -535,7 +535,12 @@ panfrost_resource_get_param(struct pipe_screen *pscreen,
enum pipe_resource_param param, unsigned usage,
uint64_t *value)
{
struct panfrost_resource *rsrc = pan_resource(prsc);
struct panfrost_resource *rsrc =
pan_resource(util_resource_at_index(prsc, plane));
/* Lowered multi plane resource gets each plane allocated independently. */
if (!rsrc->image.planes[plane])
plane = 0;
switch (param) {
case PIPE_RESOURCE_PARAM_STRIDE: