vk/runtime: Allow enumerate and try_create_for_drm to coexist
For drivers that can support both drm and non-drm kernel mode drivers it is useful to be able to provide both entrypoints. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
This commit is contained in:
@@ -396,8 +396,11 @@ enumerate_drm_physical_devices_locked(struct vk_instance *instance)
|
||||
static VkResult
|
||||
enumerate_physical_devices_locked(struct vk_instance *instance)
|
||||
{
|
||||
if (instance->physical_devices.enumerate)
|
||||
return instance->physical_devices.enumerate(instance);
|
||||
if (instance->physical_devices.enumerate) {
|
||||
VkResult result = instance->physical_devices.enumerate(instance);
|
||||
if (result != VK_ERROR_INCOMPATIBLE_DRIVER)
|
||||
return result;
|
||||
}
|
||||
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user