Commit graph

31 commits

Author SHA1 Message Date
Alex Bates
575cf49d95 Remove ion wsialloc implementation
Signed-off-by: Alex Bates <alex.bates@arm.com>
Change-Id: Iecfb86ecefc0cfba2796b9dca6b105392a3b3f73
2025-11-10 16:28:20 +00:00
Lior Dekel
65078fb361 Adding debug interface
Added new debug file with function that exposes the
DRM modifier of a swapchain image buffer.
Building the layer with DEBUG=1 flag will result
building this file and tests can now get the modifier
value for assertions.

Signed-off-by: Lior Dekel <lior.dekel@arm.com>
Change-Id: I97a44dbda87b7cdb8984576aab613612f2f12a55
2025-11-04 12:20:24 +00:00
Nir Ekhauz
c8061bd8c7 Support VK_KHR_present_mode_fifo_latest_ready
Support the promoted present_mode_fifo_latest_ready extension.

Change-Id: I92d27aa39553707cd36d7fb7067ffae82f2d95cd
Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
2025-10-21 16:21:58 +01:00
Nir Ekhauz
9053ee1b74 Support VK_KHR_swapchain_maintenance1
Update:
1. Json file.
2. README file.
3. WSI Layer code.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: I3881090238804f70a88fefbd0a3232faf5181305
2025-10-16 16:02:36 +01:00
Ginu Jacob
ff882b5f84 Updating the api version to 1.4.325
Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I0808c23a48ea7c11341cf93b342ca6c76a577c8a
2025-10-10 12:36:02 +01:00
Nir.Ekhauz
1ca76265fe Support VK_KHR_surface_maintenance1
Upadte:
1. Json file.
2. README file.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: I6ea5fcb08bcf84aa2df2e6468b440f3bab9b7158
2025-09-21 11:15:21 +03:00
Nir Ekhauz
8c65fb2af7 Update the layer's readme and release notes with VK_KHR_present_wait2 support
1. Update the README file.
2. Remove the guards from the code.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: Idf65baee25d09a3b4bc3b563455468bac4d5bddf
2025-09-18 10:20:43 +01:00
Maged Elnaggar
fb23a9b14e Support VK_KHR_swapchain_mutable_format extension
- Add support for VK_KHR_swapchain_mutable_format extension to the Layer.
- Expose support for the VK_KHR_swapchain_mutable_format extension.
- Improve find_extension helper API to be spec-correct, const-correct,
  and clearer by using the right base type (VkBaseInStructure for input,
  VkBaseOutStructure for output),
  and concise docs explaining it returns the first matching struct or nullptr.
- Correctly use image_create_info instead of m_image_create_info in
  create_swapchain_image function for Wayland.

Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
Change-Id: Id40b28977e63ba76012d3a8f693327f757d75dcd
2025-09-11 09:28:03 +01:00
Nir Ekhauz
7fac7b1339 Update the layer's readme and release notes with VK_KHR_present_id2 support
Removed experimental flags around this extension.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: If314e8c05d0f0fd7405379fe1c714f0e56519b4b
2025-08-20 12:45:46 +01:00
Nir Ekhauz
0545f795de Document the VK_PRESENT_MODE_FIFO_LATEST_READY_EXT support for Headless and Wayland
1. Remove the guards.
2. Update the README.md file

Signed-off-by: Nir Ekhauz <nir.ekhauz@arm.com>
Change-Id: Iccf31b407c5cef4ebf2577f48cc378c6438ccf68
2025-06-08 15:32:22 +03:00
Normunds Rieksts
cedf53a2be Enables the present wait extension by default - experimental flag is no longer needed.
Fixes the following issues:

* For Wayland backend, populates the presentation feedback listener with all callbacks as it is considered a fault by the protocol to not implement those
* For Wayland backend presentation feedback listener, forwards the feedback_discarded event to present ID as there could be situations where previously submitted buffers are discarded, such as when swapchains are using the MAILBOX presentation mode.
* For all swapchains, communicate critical errors back to present wait extension as otherwise, all callers waiting that are waiting on present to be delivered in vkWaitForPresentKHR call will never exit.
* Expanded the implementation in vkWaitForPresentKHR to be able to return critical swapchain errors if they have occured during the wait time.
* Fix issues in present ID where infinite waits could result in the vkWaitForPresentKHR call returning immediately due to UINT64_MAX timeout resulting in overflowing the system clock used in std::condition_variable

Change-Id: I1e475c3073c05394db259657eae1da21764a5a5c
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
Signed-off-by: Alex Bates <alex.bates@arm.com>
2025-06-06 16:41:12 +00:00
shamao01
b813cf4145 Fix WSI version to suite the Vulkan header version
Signed-off-by: shamao01 <shai.maor@arm.com>
Change-Id: I2c509bdef00d300570ee20266ffd1fe0a78e3096
2025-04-14 08:38:30 +01:00
Normunds Rieksts
16d1f2d5cb Fix surface_maintenance1 being documented as device extension 2025-02-13 13:40:02 +00:00
Normunds Rieksts
dc81527ecc Document *_maintenance1 as supported by the layer 2025-02-13 10:50:26 +00:00
Angeliki Agathi Tsintzira
1f37310208 Check for unsupported surfaces in the layer
Change-Id: I64eca7bf0f5f095c4dbc916c84377ae17350b3ec
Signed-off-by: Angeliki Agathi Tsintzira <angelikiagathi.tsintzira@arm.com>
2025-01-13 10:53:31 +00:00
Iason Paraskevopoulos
be2fee5043 Rename KERNEL_DIR to KERNEL_HEADER_DIR
Renames KERNEL_DIR to KERNEL_HEADER_DIR to allow getting the kernel
headers from a directory that is not coupled with the kernel source
tree.

Change-Id: Ic98b39dd2ec117ef4bc413cb3bf86eee89ebe4fd
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2024-10-31 10:40:09 +00:00
Iason Paraskevopoulos
cd19e3827b Add dma_buf_heaps wsialloc implementation
Change-Id: I738f8cbfb1aec52a122689ebaeb7f5b898ba200a
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2024-10-31 10:40:09 +00:00
Dennis Tsiang
dbf8ad01c0 Disable the FIFO present thread implementation on Wayland by default
The FIFO implementation in the Wayland backend that uses the
presentation thread is not technically Vulkan conformant. This commit
enables a true FIFO implementation that is conformant to the Vulkan
spec by blocking in the vkQueuePresent path. On Wayland this is
achieved by having the main thread wait for the frame_done event to be
sent by the compositor. This was already used in FIFO before but
previously it would be the presentation thread that would block.
This implementation is now used by default.

The downside of this approach is that it has a significant performance
impact due to blocking the main thread.

Users wishing to continue using the presentation thread
implementation to achieve better performance can still do so through
a new build option `ENABLE_WAYLAND_FIFO_PRESENTATION_THREAD`.

The README has also been updated to document the FIFO shortcomings.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Change-Id: I8674f9ea330a45f97d32024f97057ffc25c76c7a
2024-10-21 12:24:40 +01:00
Iason Paraskevopoulos
67575b895f Merge 'Implement support for marking frame boundaries' into 'main'
See merge request mesa/vulkan-wsi-layer!112
2024-10-01 15:18:22 +00:00
Normunds Rieksts
94dd9840c9 Implement support for marking frame boundaries 2024-10-01 15:18:22 +00:00
Iason Paraskevopoulos
61dbbef491 Extend README with implemented extensions by the layer
Change-Id: Ifb80ad8a28e1d529cc527bab0d3888916a15b4a2
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2024-09-26 14:11:12 +01:00
Iason Paraskevopoulos
3ed23f713c Add a note for tracing in the README
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: Ie11e983a2893e5b1b7305e38aba574064013ef40
2024-03-26 17:04:48 +00:00
Nir Ekhauz
5b973740b0 Change vulkan wsi project to use "main" branch
Signed-off-by: Nir Ekhauz <nir.ekhauz@arm.com>
Change-Id: I82fa871371bf025a5c181f3b55812a2bee80d566
2023-02-12 13:39:28 +02:00
Ben Davis
48310faa25 Add pre-commit hook to check for copyright header
Change-Id: I1d3b9d51305d257c9c322caf4cf4d97667fb687b
Signed-off-by: Ben Davis <ben.davis@arm.com>
2022-10-31 13:42:51 +00:00
Aron Virginas-Tar
8444165b25 Update WSI layer to use C++17 2022-08-19 08:56:59 +00:00
Iason Paraskevopoulos
626e40ba96 Add WSI integration guide
Adds a guide on implementing a WSI backend and extra documentation in
a few functions in swapchain_base.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: Ibdc702a05605989940966aae168331268c1ce2ba
2022-06-15 10:33:32 +01:00
Matteo Franchin
dd1f3f24cc Enable instance extensions required by layer
The layer needs functionality that is not part of Vulkan 1.0 and is
provided by either Vulkan 1.1 or separate Vulkan extensions.
The layer used to solve this issue by bumping the API version passed
by the application in VkCreateInfo to 1.1 if this was set to 1.0.
This workaround does not seem to be working anymore with recent
versions of the loader. Fortunately, the loader now allows layers
to change the extension lists passed by the application.
This patch changes the layer to use this approach and removes the
API bump logic.

Documentation is updated accordingly.

Change-Id: I61c426311612c7f288a0f7d969782d6c5365acf5
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
2022-05-30 13:51:20 +01:00
Matteo Franchin
454ce6c267 Add documentation for Wayland support
- Clarify requirement of Vulkan 1.1 support in Vulkan Loader and ICDs
- Add a list of Vulkan extensions required for Wayland
- Document option to provide a custom implementation of the wsialloc.h
  interface and to disable support for VK_EXT_headless_surface
- Fix link to Vulkan Loader documentation

Change-Id: I791577a49570855fde86b2ffb1ac8e966f2073d9
2021-11-02 18:11:03 +00:00
Iason Paraskevopoulos
8dc4d923ff Adds initial support for VK_KHR_wayland_surface.
Very basic Wayland support is implemented by importing
memory with VK_EXT_image_drm_format_modifiers.
The current implementation requires an external system
memory allocator. An API for this allocator is defined
in util/wsialloc/wsialloc.h and an implementation using
the ION memory allocator is included.

Outstanding issues:
 * This is an initial prototype for Wayland support and
   has many outstanding TODOs which need addressing to
   properly use the Wayland protocol.
 * Using ICD Exported memory instead of a system allocator
   is not implemented.

Wayland support is still experimental and outstanding issues
will be fixed in future commits.

Change-Id: I1b0d5991e15ff1cf25ebbab3392a631b021e8c17
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2021-02-09 18:22:09 +00:00
Matteo Franchin
7670a0ac84 Fix small issues in documentation and code
A couple of details in the installation instructions needed updating.
Also fixed a warning message due to a missing return statement (the
return value is currently not used in calls to the function).

Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
Change-Id: I715b954579253e664ebe01f757587e0602ad82e7
2019-09-11 13:26:22 +00:00
Matteo Franchin
9b698b4a2f Initial sources for the vulkan-wsi-layer project
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>
2019-05-31 15:48:05 +01:00