diff options
author | Jason Ekstrand <[email protected]> | 2018-02-09 15:43:27 -0800 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2018-02-21 22:37:10 +0000 |
commit | f5433e4d6ce247b86daed741c07aa99f2bd02c0d (patch) | |
tree | 17fd2fc1f98c4a4b97fbe45b208ffe833e32a40c /src/vulkan/wsi/wsi_common.h | |
parent | 55b27e1e5f21d62855e955446a63afb5ef8b97a6 (diff) |
vulkan/wsi: Add modifiers support to wsi_create_native_image
This involves extending our fake extension a bit to allow for additional
querying and passing of modifier information. The added bits are
intended to look a lot like the draft of VK_EXT_image_drm_format_modifier.
Once the extension gets finalized, we'll simply transition all of the
structs used in wsi_common to the real extension structs.
Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common.h')
-rw-r--r-- | src/vulkan/wsi/wsi_common.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index 3e0d3be1c24..6cf729ba025 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -35,11 +35,15 @@ */ #define VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA (VkStructureType)1000001002 #define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003 +#define VK_STRUCTURE_TYPE_WSI_FORMAT_MODIFIER_PROPERTIES_LIST_MESA (VkStructureType)1000001004 struct wsi_image_create_info { VkStructureType sType; const void *pNext; bool scanout; + + uint32_t modifier_count; + const uint64_t *modifiers; }; struct wsi_memory_allocate_info { @@ -48,14 +52,32 @@ struct wsi_memory_allocate_info { bool implicit_sync; }; +struct wsi_format_modifier_properties { + uint64_t modifier; + uint32_t modifier_plane_count; +}; + +/* Chain in for vkGetPhysicalDeviceFormatProperties2KHR */ +struct wsi_format_modifier_properties_list { + VkStructureType sType; + const void *pNext; + + uint32_t modifier_count; + struct wsi_format_modifier_properties *modifier_properties; +}; + struct wsi_interface; #define VK_ICD_WSI_PLATFORM_MAX 5 struct wsi_device { + VkPhysicalDevice pdevice; VkPhysicalDeviceMemoryProperties memory_props; uint32_t queue_family_count; + bool supports_modifiers; + uint64_t (*image_get_modifier)(VkImage image); + #define WSI_CB(cb) PFN_vk##cb cb WSI_CB(AllocateMemory); WSI_CB(AllocateCommandBuffers); @@ -79,6 +101,7 @@ struct wsi_device { WSI_CB(GetImageSubresourceLayout); WSI_CB(GetMemoryFdKHR); WSI_CB(GetPhysicalDeviceFormatProperties); + WSI_CB(GetPhysicalDeviceFormatProperties2KHR); WSI_CB(ResetFences); WSI_CB(QueueSubmit); WSI_CB(WaitForFences); |