mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-14 23:50:35 +01:00
venus: track dedicated image during mem alloc
Need this because the new common wsi interface only returns the wsi
memory from the acquired image index.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39401>
(cherry picked from commit 3fca8423c9)
This commit is contained in:
parent
48c28ee238
commit
960a4d667b
3 changed files with 10 additions and 1 deletions
|
|
@ -3874,7 +3874,7 @@
|
|||
"description": "venus: track dedicated image during mem alloc",
|
||||
"nominated": false,
|
||||
"nomination_type": 0,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ struct vn_device_memory {
|
|||
uint64_t bo_roundtrip_seqno;
|
||||
|
||||
VkDeviceSize map_end;
|
||||
|
||||
/* only valid when wsi platform is used */
|
||||
struct vn_image *dedicated_img;
|
||||
};
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_device_memory,
|
||||
base.vk.base,
|
||||
|
|
|
|||
|
|
@ -243,6 +243,12 @@ vn_wsi_memory_info_init(struct vn_device_memory *mem,
|
|||
struct vn_buffer *buf = vn_buffer_from_handle(dedicated_info->buffer);
|
||||
buf->wsi.mem = mem;
|
||||
}
|
||||
|
||||
/* wsi_memory_allocate_info is not chained for prime blit src */
|
||||
if (dedicated_info && dedicated_info->image != VK_NULL_HANDLE) {
|
||||
struct vn_image *img = vn_image_from_handle(dedicated_info->image);
|
||||
mem->dedicated_img = img;
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue