Commit graph

373 commits

Author SHA1 Message Date
Dennis Tsiang
12b15ec3fe Merge 'Document the VK_PRESENT_MODE_FIFO_LATEST_READY_EXT support for Headless and Wayland' into 'main'
See merge request mesa/vulkan-wsi-layer!171
2025-06-10 07:33:31 +00: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
Iason Paraskevopoulos
1ef16210ea Merge 'Enable and fix VK_KHR_present_wait device extension' into 'main'
See merge request mesa/vulkan-wsi-layer!165
2025-06-06 16:41:12 +00: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
Iason Paraskevopoulos
604b1e6a17 Merge 'Improvement for present timing stages' into 'main'
See merge request mesa/vulkan-wsi-layer!168
2025-06-06 09:56:17 +00:00
Ginu Jacob
ef9b6eed8c Improvement for present timing stages
In this change, handling for the present timings stages are improved.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I68e9ae67fa94d39e23504890d922a85bdce938cd
2025-06-06 09:56:17 +00:00
Rosen Zhelev
106de49b9e Merge 'Fix refresh duration comment for headless backend' into 'main'
See merge request mesa/vulkan-wsi-layer!169
2025-06-06 10:54:35 +01:00
Fufu Fang
a98287a681 Fix refresh duration comment for headless backend
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
Change-Id: I9e37ea162197dd8fbb75679663fa9b4b5e9e9694
2025-06-05 17:55:50 +01:00
Iason Paraskevopoulos
5e91113efd Merge 'Tag fences created by the layer' into 'main'
See merge request mesa/vulkan-wsi-layer!161
2025-06-04 11:18:37 +00:00
Iason Paraskevopoulos
eda337c308 Tag fences created by the layer
Tags the fences created by the layer with the WsiLayerFence name
when instrumentation has been enabled.

Change-Id: I90ad71e5073d80cd650c6ba3be406abd67185376
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-06-04 11:18:37 +00:00
Rosen Zhelev
3aee47be65 Merge 'Support VK_PRESENT_MODE_FIFO_LATEST_READY_EXT for headless & wayland' into 'main'
See merge request mesa/vulkan-wsi-layer!160
2025-06-04 09:39:04 +01:00
Avi Shif
670f1e9476 Support VK_PRESENT_MODE_FIFO_LATEST_READY_EXT for headless & wayland
Enabling VK_PRESENT_MODE_FIFO_LATEST_READY_EXT for headless & wayland
This extension is handled the same as the MAILBOX ext.

Signed-off-by: Nir Ekhauz <nir.ekhauz@arm.com>
Change-Id: I010c3c9474a6d9c28964806ba5aa63549b622454
2025-06-04 09:39:03 +01:00
Iason Paraskevopoulos
ff0ddbe47d Merge 'Acquiring timings for VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT' into 'main'
See merge request mesa/vulkan-wsi-layer!167
2025-05-28 15:59:16 +00:00
Ginu Jacob
5d4b84408a Acquiring timings for VK_PRESENT_STAGE_QUEUE_OPERATIONS_END_BIT_EXT 2025-05-28 15:59:16 +00:00
Iason Paraskevopoulos
16293a438b Merge 'Change device extension entrypoint visibility check' into 'main'
See merge request mesa/vulkan-wsi-layer!162
2025-05-28 11:05:07 +00:00
Fufu Fang
8ee8790497 Change device extension entrypoint visibility check
The check that determines device extension entrypoint visibility
was changed in order to fix CTS failures.

Signed-off-by: Fufu Fang <fufu.fang@arm.com>
2025-05-28 11:05:07 +00:00
Dennis Tsiang
20f64a2e48 Merge 'Set refreshDuration to 1 on headless backend' into 'main'
See merge request mesa/vulkan-wsi-layer!166
2025-05-22 10:12:33 +00:00
Fufu Fang
32c15e130e Set refreshDuration to 1 on headless backend 2025-05-22 10:12:33 +00:00
Rosen Zhelev
6fce2f8e16 Merge 'Make all jobs run on Merge Requests' into 'main'
See merge request mesa/vulkan-wsi-layer!164
2025-05-20 09:37:03 +01:00
Dennis Tsiang
84d2c16afe Make all jobs run on Merge Requests
Use the standard GitLab workflows to ensure the build job is run on
both Merge Requests and the main branch.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Change-Id: I0469fd48200cb258ec6fea77bf9e817506d3570f
2025-05-19 10:28:33 +01:00
Dennis Tsiang
e876b6b4d9 Merge 'Fix compile error due to missing include' into 'main'
See merge request mesa/vulkan-wsi-layer!163
2025-05-16 18:06:42 +00:00
Normunds Rieksts
3c82178968 Fix compile error due to missing include 2025-05-16 18:06:42 +00:00
Rosen Zhelev
b2484fe518 Merge 'Introduce swapchain_image_creator' into 'main'
See merge request mesa/vulkan-wsi-layer!154
2025-05-16 16:22:43 +01:00
Dennis Tsiang
fb48778631 Merge 'Support WSI present timing if time domain supported' into 'main'
See merge request mesa/vulkan-wsi-layer!159
2025-05-16 08:26:19 +00:00
Maged Elnaggar
16e77d770a Support WSI present timing if time domain supported 2025-05-16 08:26:19 +00:00
Dennis Tsiang
c3b192ac2f Merge 'Set present timing feature false if timestamp querying is not supported' into 'main'
See merge request mesa/vulkan-wsi-layer!155
2025-05-15 12:36:48 +00:00
Ginu Jacob
7f68fef91d Set present timing feature false if timestamp querying is not supported 2025-05-15 12:36:48 +00:00
Rosen Zhelev
089418f0a8 Merge 'Use the KHR version for vkGetCalibratedTimestamps' into 'main'
See merge request mesa/vulkan-wsi-layer!156
2025-05-14 16:32:07 +01:00
Ginu Jacob
29ee099f25 Use the KHR version for vkGetCalibratedTimestamps
In this change, instead of checking the available version for
vkGetCalibratedTimestamps between KHR and EXT, unconditionally use the
KHR version in VK_EXT_present_timing as the extension has a dependency
on VK_KHR_calibrated_timestamps extension.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I279182ae6d5311613c430546a8054dee0276c499
2025-05-14 16:32:07 +01:00
Iason Paraskevopoulos
38e972a71d Merge 'Implement vkWaitForPresentKHR entrypoint' into 'main'
See merge request mesa/vulkan-wsi-layer!158
2025-05-09 16:04:39 +00:00
Normunds Rieksts
ab138f30ef Implement vkWaitForPresentKHR entrypoint 2025-05-09 16:04:39 +00:00
Dennis Tsiang
01ae039cde Merge 'Fix handling of missing display.' into 'main'
See merge request mesa/vulkan-wsi-layer!157
2025-05-07 15:33:03 +00:00
Iason Paraskevopoulos
c9db587a9c Amend doxygen comments
Change-Id: I605f8f1b93eab28d5ea58c6f82798d8e14d2fa84
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-05-07 09:21:14 +01:00
Iason Paraskevopoulos
5d646b9ee3 Add missing documentation
Adds missing documentation and changes
swapchain_image_creator::add_extensions to take a reference instead of a
pointer.

Change-Id: I0f2fc2017e00901c74113bbd0ed99a18cb9bf01e
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-05-01 13:03:58 +01:00
Iason Paraskevopoulos
86b980676a Merge 'Fix the extension name stripping in CMakeLists.txt' into 'main'
See merge request mesa/vulkan-wsi-layer!153
2025-04-30 16:33:07 +00:00
Iason Paraskevopoulos
1b200e52ec Merge 'Conditionally get a device queue' into 'main'
See merge request mesa/vulkan-wsi-layer!152
2025-04-30 08:20:07 +00:00
Iason Paraskevopoulos
b7b413e380 Conditionally get a device queue
Modifies swapchain_base::init to get a device queue only when external sync is not supported.

Signed-off-by: Iason Paraskevopoulos iason.paraskevopoulos@arm.com 
Change-Id: I638f4e75cfa9848f415ce1c9776cb8de82f24ca1
2025-04-30 08:20:07 +00:00
Fufu Fang
b07d5d61e2 Fix the extension name stripping in CMakeLists.txt
This patch fixes the sed command in CMakeLists.txt. Previously
the extended regular expression flag was not correctly set.

Change-Id: I7beb1c2ba68134ecd1cf37bbc0f7888f903fd6bb
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
2025-04-29 16:46:49 +01:00
Iason Paraskevopoulos
281049aa78 Merge remote-tracking branch 'main' into add_swapchain_image_creator
Change-Id: I22a4c697c8b1181127242848f37ea081243f0d03
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-04-25 15:30:01 +01:00
Iason Paraskevopoulos
ca3820a0ba Add external memory extension
Adds a swapchain create info extension for creating an image using
external memory. This removes the need for modifying the
image_create_info in the display and wayland backends. There is still
code duplication left in these backends though, because swapchain
allocation needs to know the selected format. This will be removed when
the swapchain images will be created from the swapchain image creator.

Moves the definition of drm_format_pair to drm_utils.

Removes two step initialization from swapchain_wsi_allocator.

Change-Id: I0c937a59cc62e7e3134f0af4728fdda3739237bd
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-04-25 15:28:39 +01:00
Iason Paraskevopoulos
b326e4b21f Add wsialloc wrapper class
Adds a class for owning and managing a wsialloc allocator, which removes
duplicated functionality from the wayland and display backends.

Change-Id: Ieb0c75481c2b1c0019e620a88fc0e153eba1e29a
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-04-25 15:03:42 +01:00
Iason Paraskevopoulos
9ba06600b5 Add compression control image creator extension
Copies the image_compression_control implementation from wsi/extensions
to wsi/swapchain_image_create_extensions. Replaces the usage of the
wsi_extension with the swapchain_image_create_extension in the headless
backend.

Change-Id: I29c5d0b7eba4f79be63fda3f103ff786968fc367
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-04-25 15:03:42 +01:00
Iason Paraskevopoulos
1e9cb8b1b3 Introduce swapchain_image_creator
Adds a new class named swapchain_image_creator, which will be
responsible for owning and extending image create info.

Change-Id: Icdda2304698e110d4c0d52caa6b7c1fe59c383a9
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2025-04-25 15:03:42 +01:00
Avi Shif
873ce8885a Fix handling of missing display.
If the display doesn't exit in function
GetPhysicalDeviceDisplayPlanePropertiesKHR,
the function should return zero properties
but should not return error.

Signed-off-by: Avi Shif <avi.shif@arm.com>
Change-Id: I616669a3cd3db6294dae5250c7474ba6f58bd380
2025-04-24 12:12:39 +03:00
Iason Paraskevopoulos
a6de7b407e Merge 'Fix WSI version to suite the Vulkan header version' into 'main'
See merge request mesa/vulkan-wsi-layer!150
2025-04-23 11:20:19 +00:00
Iason Paraskevopoulos
2f36a7acb4 Merge 'VK_EXT_present_timing updates for Wayland' into 'main'
See merge request mesa/vulkan-wsi-layer!149
2025-04-15 10:33:01 +00:00
Fufu Fang
e765b38308 VK_EXT_present_timing updates for Wayland
This commit updates time domain used in the
VK_PRESENT_STAGE_IMAGE_FIRST_PIXEL_VISIBLE_BIT_EXT present stage
in the Wayland backend.

Change-Id: I0d158d0eea6608edd532fbebadb18713d5486d6b
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
Signed-off-by: Alex Bates <alex.bates@arm.com>
2025-04-14 13:58:26 +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
Iason Paraskevopoulos
6958c14113 Merge 'Add missing array include to present_timing_handler' into 'main'
See merge request mesa/vulkan-wsi-layer!148
2025-04-11 05:45:37 +00:00
shamao01
c95e1a9f96 Add missing array include to present_timing_handler
Change-Id: I0d01c29c1b115053aae3c4b606b8d24467ffe48c
Signed-off-by: shamao01 <shai.maor@arm.com>
2025-04-10 13:14:38 +00:00