mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
venus: fix to relax the KHR_external_memory_fd requirement
This reverts commit1895de16a6. The proper way to filter out venus incapable physical devices is to do the platform specific check during renderer side instance creation time. Fixes:1895de16a6("venus: filter out venus incapable physical devices") (cherry picked from commitc2fe95a364) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
parent
7b5e16fb05
commit
f54c73b080
2 changed files with 6 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue