mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
zink: set zink_bo is_user_ptr on creation
We need to release user_ptr resources earlier, so we don't keep stale
references around, but for that to happen we also need to know which
resource is a user_ptr one in the first place.
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36701>
(cherry picked from commit e31d5bc5a9)
This commit is contained in:
parent
76d3f87af1
commit
c695acb5d4
2 changed files with 4 additions and 1 deletions
|
|
@ -134,7 +134,7 @@
|
|||
"description": "zink: set zink_bo is_user_ptr on creation",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -308,6 +308,9 @@ bo_create_internal(struct zink_screen *screen,
|
|||
goto fail;
|
||||
}
|
||||
|
||||
VkImportMemoryHostPointerInfoEXT *hpi = vk_find_struct(&mai, IMPORT_MEMORY_HOST_POINTER_INFO_EXT);
|
||||
bo->u.real.is_user_ptr = hpi && hpi->pHostPointer;
|
||||
|
||||
if (init_pb_cache) {
|
||||
bo->u.real.use_reusable_pool = true;
|
||||
pb_cache_init_entry(&screen->pb.bo_cache, bo->cache_entry, &bo->base.base, mem_type_idx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue