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:
@@ -1106,20 +1106,12 @@ dzn_instance_add_physical_device(struct vk_instance *instance,
|
|||||||
static VkResult
|
static VkResult
|
||||||
dzn_enumerate_physical_devices(struct vk_instance *instance)
|
dzn_enumerate_physical_devices(struct vk_instance *instance)
|
||||||
{
|
{
|
||||||
VkResult result = VK_SUCCESS;
|
VkResult result = dzn_enumerate_physical_devices_dxcore(instance);
|
||||||
|
|
||||||
mtx_lock(&instance->physical_devices.mutex);
|
|
||||||
if (!instance->physical_devices.enumerated) {
|
|
||||||
result = dzn_enumerate_physical_devices_dxcore(instance);
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (result != VK_SUCCESS)
|
if (result != VK_SUCCESS)
|
||||||
result = dzn_enumerate_physical_devices_dxgi(instance);
|
result = dzn_enumerate_physical_devices_dxgi(instance);
|
||||||
#endif
|
#endif
|
||||||
if (result == VK_SUCCESS)
|
|
||||||
instance->physical_devices.enumerated = true;
|
|
||||||
}
|
|
||||||
mtx_unlock(&instance->physical_devices.mutex);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user