meson: only build imgui when needed
[mesa.git] / src / vulkan / wsi / wsi_common.h
index f6ca013c2a88246e89c159c0e04b6f8b4aea4e1f..064b16a5e7ab14f686e7dd0d12996519ed9a7d28 100644 (file)
@@ -87,6 +87,8 @@ struct wsi_fence {
 
 struct wsi_interface;
 
+struct driOptionCache;
+
 #define VK_ICD_WSI_PLATFORM_MAX (VK_ICD_WSI_PLATFORM_DISPLAY + 1)
 
 struct wsi_device {
@@ -100,6 +102,24 @@ struct wsi_device {
    VkPhysicalDevicePCIBusInfoPropertiesEXT pci_bus_info;
 
    bool supports_modifiers;
+   uint32_t maxImageDimension2D;
+   VkPresentModeKHR override_present_mode;
+
+   /* Whether to enable adaptive sync for a swapchain if implemented and
+    * available. Not all window systems might support this. */
+   bool enable_adaptive_sync;
+
+   struct {
+      /* Override the minimum number of images on the swapchain.
+       * 0 = no override */
+      uint32_t override_minImageCount;
+
+      /* Forces strict number of image on the swapchain using application
+       * provided VkSwapchainCreateInfoKH::RminImageCount.
+       */
+      bool strict_imageCount;
+   } x11;
+
    uint64_t (*image_get_modifier)(VkImage image);
 
 #define WSI_CB(cb) PFN_vk##cb cb
@@ -141,7 +161,8 @@ wsi_device_init(struct wsi_device *wsi,
                 VkPhysicalDevice pdevice,
                 WSI_FN_GetPhysicalDeviceProcAddr proc_addr,
                 const VkAllocationCallbacks *alloc,
-                int display_fd);
+                int display_fd,
+                const struct driOptionCache *dri_options);
 
 void
 wsi_device_finish(struct wsi_device *wsi,
@@ -241,4 +262,7 @@ wsi_common_queue_present(const struct wsi_device *wsi,
                          int queue_family_index,
                          const VkPresentInfoKHR *pPresentInfo);
 
+uint64_t
+wsi_common_get_current_time(void);
+
 #endif