radv_physical_device_to_handle(physical_device),
radv_wsi_proc_addr,
&physical_device->instance->alloc,
- physical_device->master_fd);
+ physical_device->master_fd,
+ &physical_device->instance->dri_options);
}
void
RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice);
return wsi_common_get_surface_support(&device->wsi_device,
- device->local_fd,
queueFamilyIndex,
surface,
- &device->instance->alloc,
pSupported);
}
return wsi_common_create_swapchain(&device->physical_device->wsi_device,
radv_device_to_handle(device),
- device->physical_device->local_fd,
pCreateInfo,
alloc,
pSwapchain);
}
VkResult radv_AcquireNextImageKHR(
- VkDevice _device,
+ VkDevice device,
VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
- VkFence _fence,
+ VkFence fence,
+ uint32_t* pImageIndex)
+{
+ VkAcquireNextImageInfoKHR acquire_info = {
+ .sType = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR,
+ .swapchain = swapchain,
+ .timeout = timeout,
+ .semaphore = semaphore,
+ .fence = fence,
+ .deviceMask = 0,
+ };
+
+ return radv_AcquireNextImage2KHR(device, &acquire_info, pImageIndex);
+}
+
+VkResult radv_AcquireNextImage2KHR(
+ VkDevice _device,
+ const VkAcquireNextImageInfoKHR* pAcquireInfo,
uint32_t* pImageIndex)
{
RADV_FROM_HANDLE(radv_device, device, _device);
struct radv_physical_device *pdevice = device->physical_device;
- RADV_FROM_HANDLE(radv_fence, fence, _fence);
+ RADV_FROM_HANDLE(radv_fence, fence, pAcquireInfo->fence);
- VkResult result = wsi_common_acquire_next_image(&pdevice->wsi_device,
- _device,
- swapchain,
- timeout,
- semaphore,
- pImageIndex);
+ VkResult result = wsi_common_acquire_next_image2(&pdevice->wsi_device,
+ _device,
+ pAcquireInfo,
+ pImageIndex);
if (fence && (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR)) {
- fence->submitted = true;
- fence->signalled = true;
+ if (fence->fence)
+ device->ws->signal_fence(fence->fence);
if (fence->temp_syncobj) {
device->ws->signal_syncobj(device->ws, fence->temp_syncobj);
} else if (fence->syncobj) {
return VK_SUCCESS;
}
+
+VkResult radv_GetPhysicalDevicePresentRectanglesKHR(
+ VkPhysicalDevice physicalDevice,
+ VkSurfaceKHR surface,
+ uint32_t* pRectCount,
+ VkRect2D* pRects)
+{
+ RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice);
+
+ return wsi_common_get_present_rectangles(&device->wsi_device,
+ surface,
+ pRectCount, pRects);
+}