Commit graph

356 commits

Author SHA1 Message Date
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
Rosen Zhelev
faf83d387b Merge 'Add a workaround when wp_feedback events are not delivered' into 'main'
See merge request mesa/vulkan-wsi-layer!213
2025-10-31 10:35:09 +00:00
Normunds Rieksts
9d9172fcbb Add a workaround when wp_feedback events are not delivered
Adds a workaround for compositors that do not deliver
wp_presentation_feedback events when images are submitted to the
compositor in quick succession resulting in some of them being
discarded by handling it in buffer_release event instead.

Additionally fixes a double-free bug when presentation_feedback was
replaced using move semantics.

Change-Id: I97715ffbc45c3c869f84e57dca532d3a58ad3b67
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2025-10-31 10:35:08 +00:00
Rosen Zhelev
1e5510e1a2 Merge 'support VK_KHR_present_mode_fifo_latest_ready' into 'main'
See merge request mesa/vulkan-wsi-layer!212
2025-10-21 16:21:59 +01: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
Iason Paraskevopoulos
12228bcd09 Merge 'Reset query pool on creation' into 'main'
See merge request mesa/vulkan-wsi-layer!211
2025-10-17 15:02:41 +00:00
Iason Paraskevopoulos
3da272878d Reset query pool on creation
Makes use of the VK_QUERY_POOL_CREATE_RESET_BIT_KHR when creating the
query pool. It disables present timing when VK_KHR_maintenance9 is not
supported by the device.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I9d364050f0cd4a2be74e1b1d44cf3f6a0795e6f4
2025-10-17 15:02:40 +00:00
Rosen Zhelev
b259fa8cbe Merge 'Support VK_KHR_swapchain_maintenance1' into 'main'
See merge request mesa/vulkan-wsi-layer!208
2025-10-16 16:02:36 +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
Rosen Zhelev
8f90584f20 Merge 'Updating the api version to 1.4.325' into 'main'
See merge request mesa/vulkan-wsi-layer!210
2025-10-10 15:17:32 +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
Rosen Zhelev
93a5d29657 Merge 'Support nonzero present timing queue family' into 'main'
See merge request mesa/vulkan-wsi-layer!186
2025-10-06 11:27:35 +01:00
Alex Bates
ace729f7f8 Support nonzero present timing queue family
Adds a per-device check for a 'best' queue family to
use for present timing, rather than always using index 0.

wsi_ext_present_timing holds resources (such as the command
buffer) per queue family, rather than supporting only one. However,
currently, only one queue family is supported at a time.
In future, we can hook vkGetDeviceQueue calls to map
VkQueues to their family index. Doing this will transparently
give present timing support for multiple queue families.

Signed-off-by: Alex Bates <alex.bates@arm.com>
Change-Id: I5becb29dfc4a082e301031e0c693acd23eb95a51
2025-10-06 11:27:34 +01:00
Rosen Zhelev
e1e184300e Merge 'present_id2 dependency handling in present_timing extension' into 'main'
See merge request mesa/vulkan-wsi-layer!207
2025-09-29 16:11:01 +01:00
Ginu Jacob
7d88e2a619 present_id2 dependency handling in present_timing extension
The present_timing extension depends on present_id2. The dependency
handling is incorrect and is fixed in this change.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: Id645450eeb5b22551f328a860ffec75ebdbfbc79
2025-09-29 16:11:01 +01:00
Rosen Zhelev
ec20ec83ae Merge 'Support VK_KHR_surface_maintenance1' into 'main'
See merge request mesa/vulkan-wsi-layer!206
2025-09-26 15:14:49 +01:00
Rosen Zhelev
e1d77594fb Merge 'VK_EXT_frame_boundary: Fixing the sType used in VkFrameBoundaryEXT' into 'main'
See merge request mesa/vulkan-wsi-layer!202
2025-09-22 16:41:28 +01:00
Ginu Jacob
5a2bc13570 VK_EXT_frame_boundary: Fixing the sType used in VkFrameBoundaryEXT
In this change, the sType used in VkFrameBoundaryEXT instance is fixed.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: Id1dab87b9b4144d6030c57dbe4e33a41e7045a9f
2025-09-22 16:31:11 +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
Rosen Zhelev
2f7e6e7ff3 Merge 'Update the layer's readme and release notes with VK_KHR_present_wait2 support' into 'main'
See merge request mesa/vulkan-wsi-layer!205
2025-09-18 10:20:43 +01: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
Rosen Zhelev
4ed20527c3 Merge 'Fix Wayland swapchain to support present_id2' into 'main'
See merge request mesa/vulkan-wsi-layer!199
2025-09-17 10:20:46 +01:00
Nir Ekhauz
ee6d45430f Fix Wayland swapchain to support present_id2
Adding support for present_id2

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: Ie30caf423902fea9f2bc3341c3b61390b09c0f7c
2025-09-17 10:20:46 +01:00
Rosen Zhelev
623f803387 Merge 'Implement schedule present at relative time on headless' into 'main'
See merge request mesa/vulkan-wsi-layer!201
2025-09-15 12:40:06 +01:00
Ginu Jacob
7a46cdb679 Implement schedule present at relative time on headless
In this change, the schedule present at relative time is enabled for
headless backend.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I15ff8170dfe93539e4c9a7ff20868b0916129546
2025-09-15 12:40:06 +01:00
Rosen Zhelev
a29eae014e Merge 'Silence clang-tidy warnings' into 'main'
See merge request mesa/vulkan-wsi-layer!203
2025-09-15 12:31:41 +01:00
Maged Elnaggar
c175b19ccb Silence clang-tidy warnings
Silence warnings till we investigate
unrelated warnings to the project

Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
Change-Id: Id557ffcd96dcccfb8f8a2c58d84a229e53b2ab03
2025-09-15 12:31:41 +01:00
Iason Paraskevopoulos
681648c9e9 Merge 'Query pool reads for QUEUE_OPERATIONS_END_BIT_EXT skipped when not ready' into 'main'
See merge request mesa/vulkan-wsi-layer!198
2025-09-11 15:47:13 +00:00
Ginu Jacob
1346705513 Query pool reads for QUEUE_OPERATIONS_END_BIT_EXT skipped when not ready
In this change, the return status from query pool reads for
QUEUE_OPERATIONS_END_BIT_EXT are checked and skipped when not ready.
To cater for correctness of any later reads, the value returned is
cached and compared. Additionally, a fix is added to avoid data
corruption with presentation feedback object in present timing when
vector was used.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I5f26b6a3c81eb73eff8a4073be7d7ffc81f9eef8
2025-09-11 15:47:13 +00:00
Rosen Zhelev
22502056af Merge 'Set the default DRM device node for the VK_KHR_display backend' into 'main'
See merge request mesa/vulkan-wsi-layer!196
2025-09-11 11:50:02 +01:00
Fufu Fang
5e53d9637f Scan DRM device nodes for the VK_KHR_display backend
To specify a DRM device node for the VK_KHR_display backend,
WSI_DISPLAY_DRI_DEV environment variable needs to be set. If
WSI_DISPLAY_DRI_DEV is not set, the VK_KHR_display backend
now scans all DRM device node, and uses the first node
that has a display connected.

Signed-off-by: Fufu Fang <fufu.fang@arm.com>
Change-Id: Idbcda60cf3b1656784e6d3b0547cc70e99f0fc52
2025-09-11 11:50:01 +01:00
Rosen Zhelev
6319d7dde0 Merge 'Support VK_KHR_swapchain_mutable_format extension' into 'main'
See merge request mesa/vulkan-wsi-layer!197
2025-09-11 09:28:04 +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
Rosen Zhelev
edcd2c2629 Merge 'Add clang-tidy linting to merge requests CI' into 'main'
See merge request mesa/vulkan-wsi-layer!200
2025-09-10 14:31:36 +01:00
Maged Elnaggar
9608f70237 Add clang-tidy linting to merge requests CI
Introduce a new clang_tidy job that runs on merge requests
and the default branch. The job configures CMake to export
compile_commands.json and runs run-clang-tidy restricted to
repo files. Any warnings or errors cause the job to fail.

Artifacts include clang-tidy.log and compile_commands.json
to aid local reproduction. Shared Vulkan Loader setup was
factored into a YAML anchor for reuse across jobs.

Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
Change-Id: I61b48656e68e0e83725500ae1b37f8626f9a248c
2025-09-10 14:31:35 +01:00
Rosen Zhelev
f9b4a0df56 Merge 'Adding exception-safe custom mutex to the WSI layer' into 'main'
See merge request mesa/vulkan-wsi-layer!188
2025-09-05 16:06:38 +01:00
Maged Elnaggar
78b21da4ef Adding exception-safe custom mutex to the WSI layer
Introduce util::mutex, util::recursive_mutex
and util::unique_lock; switch WSI layer call sites to it.
All locks are acquired via try_lock(), no system_error leaks.

Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
Change-Id: Ide9ef4318be7cc47e9577059695cc298f8b8e579
2025-09-05 16:06:38 +01:00
Rosen Zhelev
ef9b134054 Merge 'Update present timing types' into 'main'
See merge request mesa/vulkan-wsi-layer!195
2025-09-04 17:48:10 +01:00
Iason Paraskevopoulos
b02e682d30 Update present timing types
Updates the present timing implementation and types to be aligned with
the latest commit.

Fixes an issue, where the queue used for the presentation feedback
events was destroyed before getting the last events.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I1dba2fd0e4ad9ec8c02d71c58c93edceaa75d07e
2025-09-04 17:48:10 +01:00
Iason Paraskevopoulos
deb70d9473 Merge 'Add JSON schema to layer manifest' into 'main'
See merge request mesa/vulkan-wsi-layer!193
2025-09-03 14:51:37 +00:00
Rosen Zhelev
6baf6ff52a Merge 'Implement vkWaitForPresent2KHR' into 'main'
See merge request mesa/vulkan-wsi-layer!194
2025-08-28 15:46:50 +01:00
Nir Ekhauz
5060dbbc3a Implement vkWaitForPresent2KHR
Add the entry point for VK_KHR_present_wait2.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: I8b0ad681a6c02ea646d072e69b25113a8c8ad3ce
2025-08-28 15:46:50 +01:00
Alex Bates
88be0b1649 Add JSON schema to layer manifest
Change-Id: I00fb3306a88f9c24932ee1e9f0d623076118e6d0
Signed-off-by: Alex Bates <alex.bates@arm.com>
2025-08-26 14:16:08 +01:00
Rosen Zhelev
76771e7f67 Merge 'Initial support for VK_KHR_present_wait2' into 'main'
See merge request mesa/vulkan-wsi-layer!192
2025-08-26 13:42:14 +01:00
Nir Ekhauz
64c1c46609 Initial support for VK_KHR_present_wait2
Add support for present wait2 ext. for physical, surface and sc.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: I0f7cdadb2d3ea0ecbc32b8b2efe9fc3bb4ba0369
2025-08-26 13:42:14 +01:00
Rosen Zhelev
ad2767ee77 Merge 'Update the layer's readme and release notes with VK_KHR_present_id2 support' into 'main'
See merge request mesa/vulkan-wsi-layer!191
2025-08-20 12:45:47 +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
Rosen Zhelev
60f53bddd0 Merge 'Add initial support for VK_KHR_present_id2 in the layer' into 'main'
See merge request mesa/vulkan-wsi-layer!190
2025-08-18 10:23:02 +01:00
Nir Ekhauz
8256b027d7 Add initial support for VK_KHR_present_id2 in the layer
Add support for present id2 ext. for physical, surface and sc.

Signed-off-by: Nir Ekhauz <nir.ekhauz@arm.com>
Change-Id: I934d5d8ef7e0fde2de8682bb54696a4044edb047
2025-08-18 10:23:02 +01:00
Rosen Zhelev
a0700e3e86 Merge 'Add initial support for VK_KHR_present_id2 in the layer' into 'main'
See merge request mesa/vulkan-wsi-layer!181
2025-08-13 09:41:22 +01:00