The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

comp: Fix vk_deinit_mutex asserts when vk_create_device fails.

authored by

Meng Jiao and committed by
Simon Zeni
48f63f7f 129f8ff1

+6 -6
+6 -6
src/xrt/compositor/util/comp_vulkan.c
··· 282 282 .synchronization_2 = true, 283 283 }; 284 284 285 + ret = vk_init_mutex(vk); 286 + if (ret != VK_SUCCESS) { 287 + VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret); 288 + return ret; 289 + } 290 + 285 291 // No other way then to try to see if realtime is available. 286 292 for (size_t i = 0; i < ARRAY_SIZE(prios); i++) { 287 293 ret = vk_create_device( // ··· 313 319 // All tries failed, return error. Yes this code is clunky. 314 320 if (ret != VK_SUCCESS) { 315 321 VK_ERROR_RET(vk, "vk_create_device", "Failed to create Vulkan device.", ret); 316 - return ret; 317 - } 318 - 319 - ret = vk_init_mutex(vk); 320 - if (ret != VK_SUCCESS) { 321 - VK_ERROR_RET(vk, "vk_init_mutex", "Failed to init mutex.", ret); 322 322 return ret; 323 323 } 324 324