Enabling the VK_EXT_present_timing features
VkPhysicalDevicePresentTimingFeaturesEXT and
VkPresentTimingSurfaceCapabilitiesEXT.
The feature values are updated based on the backend.
Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: Ie322f58118108c656530128b18ec905bd6815c63
This commit adds support for querying a surface's compatible
presentation modes via VkSurfacePresentModeEXT and
VkSurfacePresentModeCompatibilityEXT, as part of the
VK_EXT_surface_maintenance1 extension.
A new struct present_mode_compatibility has been created to capture
this new functionality.
Our headless implementation supports compability between FIFO and
FIFO_RELAXED. On Wayland, we do not allow compatibility between FIFO
and MAILBOX presentation.
Change-Id: I53659cb2f2aa0ac41e37975cc34aee3ce8317a73
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
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
Adds support for the VK_KHR_get_surface_capabilities2 extension.
Change-Id: Iae882a41819baf413a0ba949ec44d6e722ebca5a
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Adds a template function for setting the supported surface formats for
a surface. This function is used in the get_surface_formats
implementation of both the WSI backends, which previously were
implementing the same logic independently.
Removes the unused surface argument from get_surface_formats and
get_surface_capabilities.
Change-Id: Ib220166675d1c24aeef230cf9f510abba9e42a61
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Reduce the number of functions that are exported by the layer. This
helps resolve dynamic linking issues where multiple functions are named
the same in different shared libraries. Also add function specifiers and
calling conventions to all extern "C" functions.
Change-Id: I07b33ff8d066e33c5dbdf0cbc13aa7835a78220b
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Defines an abstract wsi::surface object to be implemented by each WSI
backend. This object is then associated with the corresponding VkSurface
object in the instance specific data.
To keep track of these objects the layer now intercepts
vkDestroySurfaceKHR, while specific surface creation entrypoints are
intercepted by individual WSI backends.
In addition this change should allow for fixing incompatibility issues
with layers that wrap VkSurface which breaks casting to the Loader's ICD
VkSurface type.
Make greater use of util::unique_ptr and allow for such pointers to be
constructable when casting derived types.
Change-Id: I163e9c47088ad9989583ebce1319b1fc05559d73
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
In vkCreateInstance:
- ppEnabledExtensionNames is checked to determine which window-system
platforms the layer should enable support for.
- support in the layer is always enabled if possible, even if this may
be provided by the ICDs. Platforms not supported by the layer should
still be correctly supported by the ICDs (untested.)
- pApplicationInfo is changed to bump the Vulkan API version
in order to enable instance extensions that are necessary for some
of the platforms implemented in the layer.
In vkCreateDevice:
- ppEnabledExtensionNames is extended with device extensions required
by the layer.
- if the extensions are not supported by the physical device, the
layer fails to initialize the device.
Change-Id: Ibdd69fca38e7909d5b8f0ac7698805ea5f425ac6
Signed-off-by: Joe Jenner-Bailey <joe.jenner-bailey@arm.com>
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
Move all WSI type specific calls to WSI factory methods. This
removes headless references in layer/ and allows for simpler
support of multiple windowing systems.
Change-Id: I757a7a3bb4267783420b52cceb3bde8ce233297e
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
This commit adds the initial sources for the vulkan-wsi-layer project:
a Vulkan layer which implements some of the Vulkan window system
integration extensions such as VK_KHR_swapchain.
The layer is designed to be GPU vendor agnostic when used as part of the
Vulkan ICD/loader architecture.
The project currently implements support for VK_EXT_headless_surface and
its dependencies. We hope to extend support for further platforms such
as Wayland and direct-to-display rendering in the future.
This initial commit collects contributions from different individuals
employed by Arm.
More information on the project (building instructions, how to
contribute, etc.) can be found on the README.md file at the top of the
project tree.
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>