Commit graph

392 commits

Author SHA1 Message Date
shamao01
823d5baf22 Fix badword token from clang-tidy config
Replace the old “all checks minus specific modules” pattern with an explicit allow-list of clang-tidy modules,
preserving the intended set of enabled checks while avoiding the banned word that triggered the policy error

Signed-off-by: shamao01 <shai.maor@arm.com>
Change-Id: I6f392075b42be0cd278bdd4aff6ee2064d8c52e0
2026-01-29 09:24:54 +00:00
Iason Paraskevopoulos
feb069171f Merge 'Remove present timing declarations' into 'main'
See merge request mesa/vulkan-wsi-layer!229
2026-01-27 12:00:44 +00:00
Iason Paraskevopoulos
b8c4b0fee1 Merge 'Shared present mode, free image on release and limit image count to 1' into 'main'
See merge request mesa/vulkan-wsi-layer!228
2026-01-27 11:25:45 +00:00
Ginu Jacob
a0b6497838 Shared present mode, free image on release and limit image count to 1
In this change, the shared present mode is fixed to keep the min/max image count to 1. Additionally the image status is set to free when the image is released.

Signed-off-by: Ginu Jacob ginu.jacob@arm.com 
Change-Id: Ibb779911a222b7917190e35fbf8711b292a6d1c3
2026-01-27 11:25:45 +00:00
Iason Paraskevopoulos
fc66fce53d Remove present timing declarations
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I5136ef7be447a5f8e06c773995be576381ff43a4
2026-01-26 14:16:16 +00:00
Iason Paraskevopoulos
fac9daabaf Merge 'Add wait flag on querying present timing queue operations end timestamp' into 'main'
See merge request mesa/vulkan-wsi-layer!227
2026-01-22 11:26:21 +00:00
Ginu Jacob
4a48c09a39 Add wait flag on querying present timing queue operations end timestamp
Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I10064e5144d542e41dd36b4dd7d5555a215b2a31
2026-01-22 11:26:21 +00:00
Iason Paraskevopoulos
2f8256d094 Merge 'DDK build error seen with VK_KHR_DISPLAY=y build option' into 'main'
See merge request mesa/vulkan-wsi-layer!226
2026-01-08 09:47:31 +00:00
Nir.Ekhauz
17ea8c82d9 DDK build error seen with VK_KHR_DISPLAY=y build option
Fix external_memory_extension.cpp in order to be able to be build by gcc11.

Signed-off-by: Nir.Ekhauz <nir.ekhauz@arm.com>
Change-Id: I58333a982067afb4d803ed06473a93646d4b1d79
2026-01-05 14:19:51 +02:00
Iason Paraskevopoulos
0aaff54da1 Merge 'Fix build warning created by "Add -Wshadow -Wconversion"' into 'main'
See merge request mesa/vulkan-wsi-layer!225
2026-01-05 11:48:08 +00:00
Maged Elnaggar
7975908caf Fix build warning created by "Add -Wshadow -Wconversion"
Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
2026-01-05 11:48:08 +00:00
Iason Paraskevopoulos
1ede24b595 Merge 'Add -Wshadow -Wconversion' into 'main'
See merge request mesa/vulkan-wsi-layer!219
2025-12-17 09:55:55 +00:00
Alex Bates
ee3f6c5ab9 * Enables new warnings (which are made errors by -Werror)
* Wshadow warns when a variable shadows another
  * Wconversion warns on implicit int conversions
* Fixes warnings generated by them

Signed-off-by: Alex Bates <alex.bates@arm.com>
2025-12-17 09:55:55 +00:00
Iason Paraskevopoulos
80b43daffa Merge 'constness adjustment for clang20' into 'main'
See merge request mesa/vulkan-wsi-layer!223
2025-12-16 14:27:45 +00:00
Iason Paraskevopoulos
6d98a178ba Merge 'Add surfaces the layer supports in unsupported_surfaces' into 'main'
See merge request mesa/vulkan-wsi-layer!222
2025-12-16 14:26:53 +00:00
Iason Paraskevopoulos
9c9dff2291 Add surfaces the layer supports in unsupported_surfaces
Extends the unsupported_surfaces_ext_array to contain surfaces
supported by the layer, when the layer is built without supporting them.

Also handles the presentWait2 feature similar to presentWait.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I2e61d56425ff657de949797be86436c9675d1b1f
2025-12-16 14:26:53 +00:00
Iason Paraskevopoulos
f596f8289f constness adjustment for clang20
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: Ib6fbcf6512a39fac7306ddcefb00846b336a92b3
2025-12-15 12:02:24 +00:00
Iason Paraskevopoulos
04d2ba65d5 Merge 'Detach proxies from queue' into 'main'
See merge request mesa/vulkan-wsi-layer!221
2025-12-11 16:28:57 +00:00
Iason Paraskevopoulos
fbe3b9e592 Merge 'Fix issues with shared present modes' into 'main'
See merge request mesa/vulkan-wsi-layer!220
2025-12-10 11:22:49 +00:00
Normunds Rieksts
01a96ed37b The change makes the following adjustments:
* Changes the image state of ACQUIRED once the image has been presented as in shared present modes they are always in an acquired state.
* Removes thread free image semaphore signalling logic for shared present modes as there is only single image available and is always in an acquired state.
* Removes the reliance on the presentation thread for the shared present modes as it shouldn't be necessary for them as the headless mode does not share the buffer resource with any consumers.
* Adds the ability for swapchain_image class to not signal present fence for presentation request. On shared presentation modes we do not need to use the present fence and it cannot be used as the swapchain only has a single image.
* Adds support for present timing extension for shared present modes.
* When shared preset mode is used, the timings returned are always
* undefined as image is always in a state of being presented.

Change-Id: I6a5a7c744fe0fc115001de55a305d253695faf9f Signed-off-by: Normunds Rieksts normunds.rieksts@arm.com
2025-12-10 11:22:49 +00:00
Iason Paraskevopoulos
5e225e0896 Detach proxies from queue
Instead of destroying the wayland buffers from the private data
we just remove the proxies from the queue.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I0e9dd158feaffa697ea30b3c49d41661ec3d924c
2025-12-02 16:24:43 +00:00
Iason Paraskevopoulos
0866cfc352 Merge 'Fix a case where OOM condition was not checked' into 'main'
See merge request mesa/vulkan-wsi-layer!218
2025-12-02 14:36:52 +00:00
Rosen Zhelev
bb18f7d897 Merge 'Fix queue destroy warning on the Wayland backend' into 'main'
See merge request mesa/vulkan-wsi-layer!217
2025-12-02 12:11:06 +00:00
Iason Paraskevopoulos
cca5e62704 Merge 'Handle NULL instance parameter in vkGetInstanceProcAddr' into 'main'
See merge request mesa/vulkan-wsi-layer!216
2025-12-01 16:31:04 +00:00
Iason Paraskevopoulos
d900831556 Fix queue destroy warning on the Wayland backend
Fixes an issue where the wl_queue used for the buffer events was
destroyed before destroying the wl_buffer objects.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: Ibe25f1f1f2100dda734c5f5788209ddf89c6d47d
2025-11-28 16:41:05 +00:00
Normunds Rieksts
e030203d82 Fix a case where OOM condition was not checked
Fixes a case where backing image memory creator allocation was not
checked for out of memory condition which results in failing OOM CTS
tests.

Change-Id: I6c203599eca5562f334d4e5e3f21c200dc667ee5
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2025-11-28 15:07:25 +00:00
Muhamad Sammar
29a7a23847 Handle NULL instance parameter in vkGetInstanceProcAddr
The Vulkan spec allows passing a NULL VkInstance to
vkGetInstanceProcAddr when querying global (pre-instance) function pointers, but these functions must be resolved only through the loader, not through layers.
This change ensures that the layer correctly handles NULL instance and
prevents such incorrect behavior comming from upper layers.

Signed-off-by: Muhamad Sammar <muhamad.sammar@arm.com>
Change-Id: Icd67fa4fb819a6f5ab4c5f40d73514ba79174c05
2025-11-26 16:04:13 +01:00
Iason Paraskevopoulos
a0947a5ae8 Merge 'Fix and enhance Vulkan present timing and time domain handling' into 'main'
See merge request mesa/vulkan-wsi-layer!214
2025-11-25 10:12:34 +00:00
Ginu Jacob
71a0881d5c This change updates the present timing implementation with several fixes and improvements for better spec compliance:
* Updated present timing logic and corrected macros to match Vulkan specification values.
* Added support for vkGetPhysicalDeviceCalibrateableTimeDomainsKHR to include stage-local time domains.
* Updated handling of VK_TIME_DOMAIN_DEVICE_KHR to return timestamps in nanoseconds.
* Modified vkGetPastPresentationTimingEXT to allow retrieval of records without requiring presentIds.
* Improved vkQueuePresentKHR to terminate early when the present timing queue is full.
* Fixed VkPastPresentationTimingEXT::presentStageCount to correctly report the number of stages containing definitive results.

Signed-off-by: Ginu Jacob ginu.jacob@arm.com
2025-11-25 10:12:33 +00:00
Rosen Zhelev
fad191d840 Merge 'Decouple swapchain images and their memory from swapchain class' into 'main'
See merge request mesa/vulkan-wsi-layer!189
2025-11-20 13:55:45 +00:00
Normunds Rieksts
2d4cbd5afa Decouple swapchain images and their memory from swapchain class
Decouples the swapchain images and their memory binder/allocator logic into separate classes. This allows us to reduce code duplication across different backends that use the same type of allocation logic and also allows us to make use of RAII to release the resources for swapchain images.

The swapchain_base and other swapchain classes have been refactored to handle the new swapchain images.

The patch makes the following adjustments:

* Introduces a new swapchain_image class that holds all swapchain image resources
* Introduces a swapchain image factory class that constructs swapchain images
* Introduces a Vulkan image handle class that is responsible for constructing VkImage handles
* Introduces a new interface that describes how swapchain backing memory is being allocated
* As part of this backing memory interface, introduces device and external (wsialloc) backing memory classes
* Introduces a new interface that holds swapchain image data like wl_buffers
* Refactors lots of swapchain image parts out of the base swapchain class and moves it into the respective backends to simplify the swapchain classes.
2025-11-20 13:55:45 +00:00
Iason Paraskevopoulos
72a21a9e87 Merge 'Remove ion wsialloc implementation' into 'main'
See merge request mesa/vulkan-wsi-layer!215
2025-11-13 10:01:42 +00:00
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
Rosen Zhelev
6b3cc197ab Merge 'Guarantee surface caps is consisitent between EXT and KHR' into 'main'
See merge request mesa/vulkan-wsi-layer!204
2025-11-06 14:34:23 +00:00
Rosen Zhelev
bb8770f80b Merge 'Adding debug interface' into 'main'
See merge request mesa/vulkan-wsi-layer!209
2025-11-04 12:20:24 +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
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
Ryan Zhang
279d21607c Guarantee surface caps is consisitent between EXT and KHR
Due to Vulkan WSI only support query surface caps by KHR,
so query result will mismatch when driver support EXT and
have different strategy with Vulkan WSI.

Mesa init min/maxImageCount = {4,0} both in EXT and KHR
Vulkan WSI init min/maxImageCount = {2,6} only in KHR

So cts obtain {4,0} by vkGetPhysicalDeviceSurface
Capabilities2EXT and obtain {2,6} by vkGetPhysicalDevi
ceSurfaceCapabilitiesKHR.

fix case:
dEQP-VK.wsi.wayland.surface.query_surface_counters

Signed-off-by: Ryan Zhang <ryan.zhang@nxp.com>
2025-10-21 10:20:27 +08: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