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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user