venus: enable VK_EXT_external_memory_acquire_unmodified if needed

When used internally, we have to conditionally enable it behind the app.

Fixes: 969cb02de7 ("venus: chain VkExternalMemoryAcquireUnmodifiedEXT for wsi ownership transfers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33419>
(cherry picked from commit 1d668233ba)
This commit is contained in:
Yiwei Zhang 2025-02-05 22:59:18 +00:00 committed by Eric Engestrom
parent 93d004ab64
commit f66772f1b1
2 changed files with 10 additions and 1 deletions

View file

@ -594,7 +594,7 @@
"description": "venus: enable VK_EXT_external_memory_acquire_unmodified if needed",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "969cb02de73f3b06c36428d6bbda51e52e64f910",
"notes": null

View file

@ -333,6 +333,15 @@ vn_device_fix_create_info(const struct vn_device *dev,
extra_exts[extra_count++] = VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME;
}
/* see vn_cmd_set_external_acquire_unmodified */
if (VN_PRESENT_SRC_INTERNAL_LAYOUT != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR &&
physical_dev->renderer_extensions
.EXT_external_memory_acquire_unmodified &&
!app_exts->EXT_external_memory_acquire_unmodified && has_wsi) {
extra_exts[extra_count++] =
VK_EXT_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXTENSION_NAME;
}
if (app_exts->EXT_device_memory_report) {
/* see vn_physical_device_get_native_extensions */
block_exts[block_count++] = VK_EXT_DEVICE_MEMORY_REPORT_EXTENSION_NAME;