mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
dzn: Don't recursively lock the physical device enum mutex
Fixes: cfa260cd27 ("dzn: Use common physical device list/enumeration helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20939>
This commit is contained in:
parent
40a2b50599
commit
cdd1588d55
1 changed files with 4 additions and 12 deletions
|
|
@ -1106,20 +1106,12 @@ dzn_instance_add_physical_device(struct vk_instance *instance,
|
|||
static VkResult
|
||||
dzn_enumerate_physical_devices(struct vk_instance *instance)
|
||||
{
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
mtx_lock(&instance->physical_devices.mutex);
|
||||
if (!instance->physical_devices.enumerated) {
|
||||
result = dzn_enumerate_physical_devices_dxcore(instance);
|
||||
VkResult result = dzn_enumerate_physical_devices_dxcore(instance);
|
||||
#ifdef _WIN32
|
||||
if (result != VK_SUCCESS)
|
||||
result = dzn_enumerate_physical_devices_dxgi(instance);
|
||||
if (result != VK_SUCCESS)
|
||||
result = dzn_enumerate_physical_devices_dxgi(instance);
|
||||
#endif
|
||||
if (result == VK_SUCCESS)
|
||||
instance->physical_devices.enumerated = true;
|
||||
}
|
||||
mtx_unlock(&instance->physical_devices.mutex);
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue