mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
panvk: store BO offset in panvk_image_plane
For VK_EXT_host_image_copy, we need to access image memory from the CPU after mapping the BO. The existing base field in pan_image_plane doesn't work for this because it's a GPU address and we don't have a mechanism to recover the GPU base address of an image's BO to calculate the offset. Signed-off-by: Olivia Lee <olivia.lee@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35910>
This commit is contained in:
parent
4f8d0e81c4
commit
adb85dc307
2 changed files with 4 additions and 0 deletions
|
|
@ -408,6 +408,7 @@ panvk_image_plane_bind(struct panvk_device *dev,
|
|||
uint64_t base, uint64_t offset)
|
||||
{
|
||||
plane->plane.base = base + offset;
|
||||
plane->offset = offset;
|
||||
/* Reset the AFBC headers */
|
||||
if (drm_is_afbc(plane->image.props.modifier)) {
|
||||
/* Transient CPU mapping */
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ struct panvk_device_memory;
|
|||
struct panvk_image_plane {
|
||||
struct pan_image image;
|
||||
struct pan_image_plane plane;
|
||||
|
||||
/* Plane offset inside the image BO */
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
struct panvk_image {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue