Lines Matching refs:swapchain
464 struct wsi_swapchain *swapchain; in wsi_common_create_swapchain() local
468 &swapchain); in wsi_common_create_swapchain()
472 swapchain->fences = vk_zalloc(pAllocator, in wsi_common_create_swapchain()
473 sizeof (*swapchain->fences) * swapchain->image_count, in wsi_common_create_swapchain()
474 sizeof (*swapchain->fences), in wsi_common_create_swapchain()
476 if (!swapchain->fences) { in wsi_common_create_swapchain()
477 swapchain->destroy(swapchain, pAllocator); in wsi_common_create_swapchain()
481 *pSwapchain = wsi_swapchain_to_handle(swapchain); in wsi_common_create_swapchain()
491 VK_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain); in wsi_common_destroy_swapchain()
492 if (!swapchain) in wsi_common_destroy_swapchain()
495 swapchain->destroy(swapchain, pAllocator); in wsi_common_destroy_swapchain()
503 VK_FROM_HANDLE(wsi_swapchain, swapchain, _swapchain); in wsi_common_get_images()
506 for (uint32_t i = 0; i < swapchain->image_count; i++) { in wsi_common_get_images()
508 *image = swapchain->get_wsi_image(swapchain, i)->image; in wsi_common_get_images()
521 VK_FROM_HANDLE(wsi_swapchain, swapchain, pAcquireInfo->swapchain); in wsi_common_acquire_next_image2()
523 VkResult result = swapchain->acquire_next_image(swapchain, pAcquireInfo, in wsi_common_acquire_next_image2()
529 VkDeviceMemory mem = swapchain->get_wsi_image(swapchain, *pImageIndex)->memory; in wsi_common_acquire_next_image2()
530 wsi->set_memory_ownership(swapchain->device, mem, true); in wsi_common_acquire_next_image2()
536 swapchain->get_wsi_image(swapchain, *pImageIndex); in wsi_common_acquire_next_image2()
544 swapchain->get_wsi_image(swapchain, *pImageIndex); in wsi_common_acquire_next_image2()
565 VK_FROM_HANDLE(wsi_swapchain, swapchain, pPresentInfo->pSwapchains[i]); in wsi_common_queue_present()
569 if (swapchain->fences[image_index] == VK_NULL_HANDLE) { in wsi_common_queue_present()
576 &swapchain->alloc, in wsi_common_queue_present()
577 &swapchain->fences[image_index]); in wsi_common_queue_present()
582 wsi->WaitForFences(device, 1, &swapchain->fences[image_index], in wsi_common_queue_present()
588 wsi->ResetFences(device, 1, &swapchain->fences[image_index]); in wsi_common_queue_present()
594 swapchain->get_wsi_image(swapchain, image_index); in wsi_common_queue_present()
616 stage_flags = vk_alloc(&swapchain->alloc, in wsi_common_queue_present()
631 if (swapchain->use_prime_blit) { in wsi_common_queue_present()
641 result = wsi->QueueSubmit(queue, 1, &submit_info, swapchain->fences[image_index]); in wsi_common_queue_present()
642 vk_free(&swapchain->alloc, stage_flags); in wsi_common_queue_present()
650 result = swapchain->queue_present(swapchain, image_index, region); in wsi_common_queue_present()
655 VkDeviceMemory mem = swapchain->get_wsi_image(swapchain, image_index)->memory; in wsi_common_queue_present()
656 wsi->set_memory_ownership(swapchain->device, mem, false); in wsi_common_queue_present()