vulkan/wsi: Provide the implicitly synchronized BO to vkQueueSubmit
[mesa.git] / src / vulkan / wsi / wsi_common.h
index 46e51286e09d880ed47e7280fe9d8ddf549c3875..d15dea7b0eb97c59ff2abad85800ea42266248a3 100644 (file)
@@ -37,6 +37,7 @@
 #define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003
 #define VK_STRUCTURE_TYPE_WSI_FORMAT_MODIFIER_PROPERTIES_LIST_MESA (VkStructureType)1000001004
 #define VK_STRUCTURE_TYPE_WSI_SURFACE_SUPPORTED_COUNTERS_MESA (VkStructureType)1000001005
+#define VK_STRUCTURE_TYPE_WSI_MEMORY_SIGNAL_SUBMIT_INFO_MESA (VkStructureType)1000001006
 
 struct wsi_image_create_info {
     VkStructureType sType;
@@ -76,6 +77,13 @@ struct wsi_surface_supported_counters {
 
 };
 
+/* To be chained into VkSubmitInfo */
+struct wsi_memory_signal_submit_info {
+    VkStructureType sType;
+    const void *pNext;
+    VkDeviceMemory memory;
+};
+
 struct wsi_fence {
    VkDevice                     device;
    const struct wsi_device      *wsi_device;
@@ -109,6 +117,17 @@ struct wsi_device {
     * 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