The open source OpenXR runtime
0
fork

Configure Feed

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

c/util: Tidy comp_swapchain.c [NFC]

authored by

Jakob Bornecrantz and committed by
Simon Zeni
c6a4f62e 08cfc47d

+5
+5
src/xrt/compositor/util/comp_swapchain.c
··· 331 331 for (uint32_t i = 0; i < image_count; i++) { 332 332 sc->images[i].views.alpha = U_TYPED_ARRAY_CALLOC(VkImageView, info->array_size); 333 333 sc->images[i].views.no_alpha = U_TYPED_ARRAY_CALLOC(VkImageView, info->array_size); 334 + 334 335 if (!sc->images[i].views.alpha || !sc->images[i].views.no_alpha) { 335 336 cleanup_post_create_vulkan_setup(vk, sc); 336 337 //! @todo actually out of memory 337 338 return XRT_ERROR_VULKAN; 338 339 } 340 + 339 341 sc->images[i].array_size = info->array_size; 340 342 341 343 for (uint32_t layer = 0; layer < info->array_size; ++layer) { ··· 402 404 return XRT_ERROR_VULKAN; 403 405 } 404 406 407 + // Name it for debugging. 405 408 VK_NAME_COMMAND_BUFFER(vk, cmd_buffer, "comp_swapchain command buffer"); 406 409 407 410 VkImageAspectFlagBits image_barrier_aspect = vk_csci_get_barrier_aspect_mask(image_view_format); ··· 439 442 return XRT_ERROR_VULKAN; 440 443 } 441 444 445 + // Init all of the threading objects. 442 446 for (uint32_t i = 0; i < image_count; i++) { 443 447 444 448 ret = pthread_cond_init(&sc->images[i].use_cond, NULL); ··· 462 466 463 467 error: 464 468 cleanup_post_create_vulkan_setup(vk, sc); 469 + 465 470 return XRT_ERROR_VULKAN; 466 471 } 467 472