zink: set zink_bo is_user_ptr on creation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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:
Karol Herbst 2025-08-09 17:03:29 +02:00 committed by Eric Engestrom
parent 76d3f87af1
commit c695acb5d4
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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);