panfrost: fix image plane array copy

Reference the original code, each plane resource have
the same image plane array.

Fixes: 53e5e07c4b ("pan: Add the concept of modifier handler")
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>
(cherry picked from commit 95579b7af6)
This commit is contained in:
Qiang Yu 2025-09-09 14:24:56 +08:00 committed by Eric Engestrom
parent e93b3052b4
commit f70ac948b9
2 changed files with 2 additions and 4 deletions

View file

@ -4644,7 +4644,7 @@
"description": "panfrost: fix image plane array copy",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "53e5e07c4b7caf3afaa541fef4666453c8b4c8ef",
"notes": null

View file

@ -141,11 +141,9 @@ panfrost_resource_init_image(
assert(plane_idx == util_format_get_num_planes(iprops->format));
plane_idx = 1;
for (struct panfrost_resource *plane = pan_resource(rsc->base.next);
plane; plane = pan_resource(plane->base.next)) {
memcpy(plane->image.planes, rsc->image.planes,
plane_idx * sizeof(plane->image.planes[0]));
memcpy(plane->image.planes, rsc->image.planes, sizeof(plane->image.planes));
}
return true;