Lines Matching refs:wsi
29 wsi_device_init(struct wsi_device *wsi, in wsi_device_init() argument
36 memset(wsi, 0, sizeof(*wsi)); in wsi_device_init()
44 GetPhysicalDeviceMemoryProperties(pdevice, &wsi->memory_props); in wsi_device_init()
45 GetPhysicalDeviceQueueFamilyProperties(pdevice, &wsi->queue_family_count, NULL); in wsi_device_init()
48 wsi->func = (PFN_vk##func)proc_addr(pdevice, "vk" #func) in wsi_device_init()
77 result = wsi_x11_init_wsi(wsi, alloc); in wsi_device_init()
83 result = wsi_wl_init_wsi(wsi, alloc, pdevice); in wsi_device_init()
86 wsi_x11_finish_wsi(wsi, alloc); in wsi_device_init()
96 wsi_device_finish(struct wsi_device *wsi, in wsi_device_finish() argument
100 wsi_wl_finish_wsi(wsi, alloc); in wsi_device_finish()
103 wsi_x11_finish_wsi(wsi, alloc); in wsi_device_finish()
108 wsi_swapchain_init(const struct wsi_device *wsi, in wsi_swapchain_init() argument
118 chain->wsi = wsi; in wsi_swapchain_init()
124 vk_zalloc(pAllocator, sizeof(VkCommandPool) * wsi->queue_family_count, 8, in wsi_swapchain_init()
129 for (uint32_t i = 0; i < wsi->queue_family_count; i++) { in wsi_swapchain_init()
136 result = wsi->CreateCommandPool(device, &cmd_pool_info, &chain->alloc, in wsi_swapchain_init()
153 chain->wsi->DestroyFence(chain->device, chain->fences[i], &chain->alloc); in wsi_swapchain_finish()
155 for (uint32_t i = 0; i < chain->wsi->queue_family_count; i++) { in wsi_swapchain_finish()
156 chain->wsi->DestroyCommandPool(chain->device, chain->cmd_pools[i], in wsi_swapchain_finish()
163 select_memory_type(const struct wsi_device *wsi, in select_memory_type() argument
167 for (uint32_t i = 0; i < wsi->memory_props.memoryTypeCount; i++) { in select_memory_type()
168 const VkMemoryType type = wsi->memory_props.memoryTypes[i]; in select_memory_type()
200 const struct wsi_device *wsi = chain->wsi; in wsi_create_native_image() local
231 result = wsi->CreateImage(chain->device, &image_info, in wsi_create_native_image()
237 wsi->GetImageMemoryRequirements(chain->device, image->image, &reqs); in wsi_create_native_image()
245 wsi->GetImageSubresourceLayout(chain->device, image->image, in wsi_create_native_image()
268 .memoryTypeIndex = select_memory_type(wsi, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, in wsi_create_native_image()
271 result = wsi->AllocateMemory(chain->device, &memory_info, in wsi_create_native_image()
276 result = wsi->BindImageMemory(chain->device, image->image, in wsi_create_native_image()
288 result = wsi->GetMemoryFdKHR(chain->device, &memory_get_fd_info, &fd); in wsi_create_native_image()
312 const struct wsi_device *wsi = chain->wsi; in wsi_create_prime_image() local
336 result = wsi->CreateBuffer(chain->device, &prime_buffer_info, in wsi_create_prime_image()
342 wsi->GetBufferMemoryRequirements(chain->device, image->prime.buffer, &reqs); in wsi_create_prime_image()
365 .memoryTypeIndex = select_memory_type(wsi, 0, reqs.memoryTypeBits), in wsi_create_prime_image()
367 result = wsi->AllocateMemory(chain->device, &prime_memory_info, in wsi_create_prime_image()
372 result = wsi->BindBufferMemory(chain->device, image->prime.buffer, in wsi_create_prime_image()
398 result = wsi->CreateImage(chain->device, &image_info, in wsi_create_prime_image()
403 wsi->GetImageMemoryRequirements(chain->device, image->image, &reqs); in wsi_create_prime_image()
415 .memoryTypeIndex = select_memory_type(wsi, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, in wsi_create_prime_image()
418 result = wsi->AllocateMemory(chain->device, &memory_info, in wsi_create_prime_image()
423 result = wsi->BindImageMemory(chain->device, image->image, in wsi_create_prime_image()
430 sizeof(VkCommandBuffer) * wsi->queue_family_count, 8, in wsi_create_prime_image()
437 for (uint32_t i = 0; i < wsi->queue_family_count; i++) { in wsi_create_prime_image()
445 result = wsi->AllocateCommandBuffers(chain->device, &cmd_buffer_info, in wsi_create_prime_image()
453 wsi->BeginCommandBuffer(image->prime.blit_cmd_buffers[i], &begin_info); in wsi_create_prime_image()
472 wsi->CmdCopyImageToBuffer(image->prime.blit_cmd_buffers[i], in wsi_create_prime_image()
478 result = wsi->EndCommandBuffer(image->prime.blit_cmd_buffers[i]); in wsi_create_prime_image()
490 result = wsi->GetMemoryFdKHR(chain->device, &linear_memory_get_fd_info, &fd); in wsi_create_prime_image()
511 const struct wsi_device *wsi = chain->wsi; in wsi_destroy_image() local
514 for (uint32_t i = 0; i < wsi->queue_family_count; i++) { in wsi_destroy_image()
515 wsi->FreeCommandBuffers(chain->device, chain->cmd_pools[i], in wsi_destroy_image()
521 wsi->FreeMemory(chain->device, image->memory, &chain->alloc); in wsi_destroy_image()
522 wsi->DestroyImage(chain->device, image->image, &chain->alloc); in wsi_destroy_image()
523 wsi->FreeMemory(chain->device, image->prime.memory, &chain->alloc); in wsi_destroy_image()
524 wsi->DestroyBuffer(chain->device, image->prime.buffer, &chain->alloc); in wsi_destroy_image()
536 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_support()
548 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_capabilities()
559 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_capabilities2()
572 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_formats()
585 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_formats2()
598 struct wsi_interface *iface = wsi_device->wsi[surface->platform]; in wsi_common_get_surface_present_modes()
605 wsi_common_create_swapchain(struct wsi_device *wsi, in wsi_common_create_swapchain() argument
613 struct wsi_interface *iface = wsi->wsi[surface->platform]; in wsi_common_create_swapchain()
616 VkResult result = iface->create_swapchain(surface, device, wsi, fd, in wsi_common_create_swapchain()
657 wsi_common_acquire_next_image(const struct wsi_device *wsi, in wsi_common_acquire_next_image() argument
671 wsi_common_queue_present(const struct wsi_device *wsi, in wsi_common_queue_present() argument
692 result = wsi->CreateFence(device, &fence_info, in wsi_common_queue_present()
698 wsi->ResetFences(device, 1, &swapchain->fences[0]); in wsi_common_queue_present()
741 result = wsi->QueueSubmit(queue, 1, &submit_info, swapchain->fences[0]); in wsi_common_queue_present()
762 wsi->WaitForFences(device, 1, &last, true, 1); in wsi_common_queue_present()