vulkan/wsi: Add a mock image creation extension
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 16 Nov 2017 06:11:23 +0000 (22:11 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Dec 2017 18:04:19 +0000 (10:04 -0800)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/vulkan/wsi/wsi_common.h

index 15142f3e53639298fa645dc50bcc71a17f0c1112..243bc6f83dbfec5cd4b1a4633f57d2724e4852e5 100644 (file)
 #include <vulkan/vulkan.h>
 #include <vulkan/vk_icd.h>
 
+/* This is guaranteed to not collide with anything because it's in the
+ * VK_KHR_swapchain namespace but not actually used by the extension.
+ */
+#define VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA (VkStructureType)1000001002
+#define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003
+
+struct wsi_image_create_info {
+    VkStructureType sType;
+    const void *pNext;
+    bool scanout;
+};
+
+struct wsi_memory_allocate_info {
+    VkStructureType sType;
+    const void *pNext;
+    bool implicit_sync;
+};
+
 struct wsi_image {
    VkImage image;
    VkDeviceMemory memory;