intel/eu/gen12: Extend brw_inst.h macros for Gen12 support.
[mesa.git] / src / intel / vulkan / anv_wsi.c
index 5ed1d711689b4e152738492b4017e8c0b5ff018a..9edadb13d2d0e8b9b14b178e1129a1542552f79c 100644 (file)
@@ -49,7 +49,8 @@ anv_init_wsi(struct anv_physical_device *physical_device)
                             anv_physical_device_to_handle(physical_device),
                             anv_wsi_proc_addr,
                             &physical_device->instance->alloc,
-                            physical_device->master_fd);
+                            physical_device->master_fd,
+                            &physical_device->instance->dri_options);
    if (result != VK_SUCCESS)
       return result;
 
@@ -89,10 +90,8 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR(
    ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
 
    return wsi_common_get_surface_support(&device->wsi_device,
-                                         device->local_fd,
                                          queueFamilyIndex,
                                          surface,
-                                         &device->instance->alloc,
                                          pSupported);
 }
 
@@ -184,7 +183,7 @@ VkResult anv_CreateSwapchainKHR(
    else
      alloc = &device->alloc;
 
-   return wsi_common_create_swapchain(wsi_device, _device, device->fd,
+   return wsi_common_create_swapchain(wsi_device, _device,
                                       pCreateInfo, alloc, pSwapchain);
 }
 
@@ -294,3 +293,16 @@ VkResult anv_GetDeviceGroupSurfacePresentModesKHR(
 
    return VK_SUCCESS;
 }
+
+VkResult anv_GetPhysicalDevicePresentRectanglesKHR(
+    VkPhysicalDevice                            physicalDevice,
+    VkSurfaceKHR                                surface,
+    uint32_t*                                   pRectCount,
+    VkRect2D*                                   pRects)
+{
+   ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+
+   return wsi_common_get_present_rectangles(&device->wsi_device,
+                                            surface,
+                                            pRectCount, pRects);
+}