mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-09 10:48:29 +02:00
Adding VK_KHR_shared_presentable_image basic support
To comply with ICDs that expose the VK_KHR_shared_presentable_image extension, the Layer needs to handle VkSharedPresentSurfaceCapabilitiesKHR struct (holds sType=VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR) for queries on the VkSurfaces managed by the Layer. A simple implementation that sets the minimum required flags is provided in this commit. Since no WSI layer swapchain will support the shared presentable modes, no other functionality is required. VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT must be included in the sharedPresentSupportedUsageFlags field but implementations may support additional usages. Signed-off-by: Lior Dekel <lior.dekel@arm.com> Change-Id: I73b29e54a84376c663b3cada989c910d1ba27293
This commit is contained in:
parent
962472c729
commit
908518c92e
1 changed files with 7 additions and 0 deletions
|
|
@ -63,6 +63,13 @@ wsi_layer_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDe
|
|||
wsi::surface_properties *props = wsi::get_surface_properties(instance, pSurfaceInfo->surface);
|
||||
assert(props != nullptr);
|
||||
|
||||
auto shared_present_surface_cap_struct = util::find_extension<VkSharedPresentSurfaceCapabilitiesKHR>(
|
||||
VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, pSurfaceCapabilities);
|
||||
if (shared_present_surface_cap_struct != nullptr)
|
||||
{
|
||||
shared_present_surface_cap_struct->sharedPresentSupportedUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Any of the extensions that extend pSurfaceInfo are not supported by the
|
||||
* swapchain implementation so it is safe to ignore pNext here, even if
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue