mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
comp: Fix vk_deinit_mutex asserts when vk_create_device fails.
This commit is contained in:
parent
129f8ff1b6
commit
48f63f7f60
|
@ -282,6 +282,12 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args)
|
|||
.synchronization_2 = true,
|
||||
};
|
||||
|
||||
ret = vk_init_mutex(vk);
|
||||
if (ret != VK_SUCCESS) {
|
||||
VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// No other way then to try to see if realtime is available.
|
||||
for (size_t i = 0; i < ARRAY_SIZE(prios); i++) {
|
||||
ret = vk_create_device( //
|
||||
|
@ -316,12 +322,6 @@ create_device(struct vk_bundle *vk, const struct comp_vulkan_arguments *vk_args)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = vk_init_mutex(vk);
|
||||
if (ret != VK_SUCCESS) {
|
||||
VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Print device information.
|
||||
vk_print_opened_device_info(vk, U_LOGGING_INFO);
|
||||
|
||||
|
|
Loading…
Reference in a new issue