diff --git a/.pick_status.json b/.pick_status.json index ba0b8cb7741..aaa21c0544a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3454,7 +3454,7 @@ "description": "venus: fix to relax the KHR_external_memory_fd requirement", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1895de16a6ba00bf87b21400b1506bdf144c767e", "notes": null diff --git a/src/virtio/vulkan/vn_physical_device.c b/src/virtio/vulkan/vn_physical_device.c index e939a05ce00..2c90eea2166 100644 --- a/src/virtio/vulkan/vn_physical_device.c +++ b/src/virtio/vulkan/vn_physical_device.c @@ -1558,12 +1558,6 @@ vn_physical_device_init_renderer_extensions( vk_free(alloc, exts); - /* VK_KHR_external_memory_fd is required for venus memory mapping */ - if (!physical_dev->renderer_extensions.KHR_external_memory_fd) { - vk_free(alloc, physical_dev->extension_spec_versions); - return VK_ERROR_INCOMPATIBLE_DRIVER; - } - return VK_SUCCESS; } @@ -1683,6 +1677,10 @@ vn_physical_device_init(struct vn_physical_device *physical_dev) const VkAllocationCallbacks *alloc = &instance->base.vk.alloc; VkResult result; + result = vn_physical_device_init_renderer_extensions(physical_dev); + if (result != VK_SUCCESS) + return result; + vn_physical_device_init_external_memory(physical_dev); vn_physical_device_init_external_fence_handles(physical_dev); vn_physical_device_init_external_semaphore_handles(physical_dev); @@ -1714,6 +1712,7 @@ vn_physical_device_init(struct vn_physical_device *physical_dev) return VK_SUCCESS; fail: + vk_free(alloc, physical_dev->extension_spec_versions); vk_free(alloc, physical_dev->queue_family_properties); return result; } @@ -1927,12 +1926,6 @@ filter_physical_devices(struct vn_physical_device *physical_devs, continue; } - result = vn_physical_device_init_renderer_extensions(physical_dev); - if (result != VK_SUCCESS) { - vn_physical_device_base_fini(&physical_dev->base); - continue; - } - if (supported_count < i) physical_devs[supported_count] = *physical_dev; supported_count++;