Commit graph

381 commits

Author SHA1 Message Date
Iason Paraskevopoulos
c8d4f85a46 Merge 'Add vkGetSwapchainTimeDomainPropertiesEXT support' into 'main'
See merge request mesa/vulkan-wsi-layer!126
2024-11-15 12:49:31 +00:00
Angeliki Agathi Tsintzira
3051ca8b67 Add vkGetSwapchainTimeDomainPropertiesEXT support 2024-11-15 12:49:31 +00:00
Ginu Jacob
3675833d19 Fix the VK_KHR_DISPLAY implementation within the WSI Layer
Surface extents are initialized in this change. This fixes the issues
with execution of the wsi layer display backend. Additionally,
functional code snippets are moved out of assert calls in the file
wsi/display/swapchain.cpp to avoid them being stripped out by ndebug
compilation. This change also fixes the unused variable error in ndebug
compilation.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I4ad33ef52dbb81faaf580ce7b89ce74ffe96e002
2024-11-14 16:48:34 +00:00
Iason Paraskevopoulos
d0671474e5 Merge 'Pass frame boundary events unconditionally' into 'main'
See merge request mesa/vulkan-wsi-layer!125
2024-11-13 17:09:48 +00:00
Normunds Rieksts
91edd710b7 Pass frame boundary events unconditionally 2024-11-13 17:09:48 +00:00
Iason Paraskevopoulos
4bd840fdb6 Merge 'Add dma_buf_heaps wsialloc implementation' into 'main'
See merge request mesa/vulkan-wsi-layer!124
2024-11-11 14:20:33 +00:00
Normunds Rieksts
484d906a86 Re-add assertion to check for valid synchronisation primitives
Re-adds assertion that checked that valid synchronisation primitives
were passed to vkAcquireNextImageKHR due to failing CTS tests that were
breaking the Vulkan spec. After fixing the tests, the assertion is no
longer necessary

Change-Id: Ic600714be4012575b6d7e4f568ea54cbf2e0ca4f
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2024-11-06 15:06:33 +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
Iason Paraskevopoulos
8619f42973 Add helper functions to wsialloc
Moves out the non ion specific code from the wsialloc ion implementation
to a new wsialloc_helpers file.

Change-Id: I7ca816b27eb7e68fd1f138ec7bda006b204c0cbe
Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
2024-10-31 10:40:09 +00:00
Dennis Tsiang
21dbc4d332 Merge 'Changes to move the functional code outside of assert() call' into 'main'
See merge request mesa/vulkan-wsi-layer!123
2024-10-29 08:49:31 +00:00
Ginu Jacob
bbac6f52cf Changes to move the functional code outside of assert() call 2024-10-29 08:49:31 +00:00
Rosen Zhelev
0f5f241337 Merge 'Add stdexcept in custom_allocator.hpp' into 'main'
See merge request mesa/vulkan-wsi-layer!122
2024-10-25 09:57:24 +00:00
Iason Paraskevopoulos
7ebafbfb79 Add stdexcept in custom_allocator.hpp 2024-10-25 09:57:24 +00:00
Rosen Zhelev
b612383789 Merge 'Disable the FIFO present thread implementation on Wayland by default' into 'main'
See merge request mesa/vulkan-wsi-layer!121
2024-10-23 10:00:47 +00:00
Dennis Tsiang
4cfbc06cdb Merge 'Enable -Werror on Vulkan WSI Layer' into 'main'
See merge request mesa/vulkan-wsi-layer!120
2024-10-22 09:14:54 +00:00
Maged Elnaggar
57fedd8cdb Enable -Werror on Vulkan WSI Layer 2024-10-22 09:14:54 +00:00
Dennis Tsiang
259f5e6140 Merge 'Fix issues flagged by static analysis tools' into 'main'
See merge request mesa/vulkan-wsi-layer!119
2024-10-22 09:13:43 +00:00
Iason Paraskevopoulos
b81128724b Fix issues flagged by static analysis tools 2024-10-22 09:13:43 +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
54e4ff8c66 Merge 'Enable Vulkan-Headers compilation in CI' into 'main'
See merge request mesa/vulkan-wsi-layer!117
2024-10-16 10:39:55 +00:00
Iason Paraskevopoulos
0388e35ff2 Enable Vulkan-Headers compilation in CI 2024-10-16 10:39:54 +00:00
Rosen Zhelev
e8cacef0de Merge 'Handle VkPresentTimingsInfoEXT' into 'main'
See merge request mesa/vulkan-wsi-layer!116
2024-10-16 09:40:28 +00:00
Dennis Tsiang
a995d8e744 Merge 'Fix VK_KHR_display compilation' into 'main'
See merge request mesa/vulkan-wsi-layer!118
2024-10-16 08:57:32 +00:00
Fufu Fang
06d1972168 Fix VK_KHR_display compilation 2024-10-16 08:57:32 +00:00
Iason Paraskevopoulos
4f32b91313 Merge 'Fix build issue with newer Wayland headers' into 'main'
See merge request mesa/vulkan-wsi-layer!115
2024-10-14 11:21:53 +00:00
Dennis Tsiang
3f9d76b9fa Fix build issue with newer Wayland headers 2024-10-14 11:21:53 +00:00
ginujacob
9abd1af3ce Handle VkPresentTimingsInfoEXT
Implements the entrypoint vkSetSwapchainPresentTimingQueueSizeEXT and
handles VkPresentTimingsInfoEXT. The presentation timing queue is
also implemented the present id from parsing VkPresentTimingsInfoEXT is
stored in the queue.

Signed-off-by: ginujacob <ginu.jacob@arm.com>
Change-Id: I81b6113b54db5e59f7018ef9a22e80af6dcdd568
2024-10-11 18:56:31 +01:00
Rosen Zhelev
0c4356ed7d Merge 'Fix bug in frame boundary feature' into 'main'
See merge request mesa/vulkan-wsi-layer!114
2024-10-11 09:32:14 +00:00
Dennis Tsiang
c859eef158 Fix bug in frame boundary feature
In submit_wait_request we were passing the memory location of the
pointer to submission_pnext instead of the actual pointer. This commit
fixes it to pass the actual pointer. Additionally when creating the
frame boundary, set the pNext explicitly to nullptr.

Change-Id: I61ab9c898c3af4b3f401a3de6fdf7201fd2553ac
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2024-10-10 10:26:52 +01:00
Iason Paraskevopoulos
e6fa021f8d Merge 'Add support for wp_presentation in the WSI layer' into 'main'
See merge request mesa/vulkan-wsi-layer!113
2024-10-03 16:12:53 +00: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
ginujacob
7f63c67cf2 Add support for wp_presentation in the WSI layer
Enabling the support for wp_presentation in
Wayland surface. A handle to the interface is
stored in the Wayland surface. The handle is
initialized for each VKSurface.

Signed-off-by: ginujacob <ginu.jacob@arm.com>
Change-Id: I9a2239b3047720fdeb857e23bb529c0f0fce9575
2024-10-01 13:37:29 +01:00
Iason Paraskevopoulos
41d0942b12 Merge 'Extend README with implemented extensions by the layer' into 'main'
See merge request mesa/vulkan-wsi-layer!111
2024-09-30 14:44:33 +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
2449525741 Merge 'Advertise VK_EXT_present_timing features.' into 'main'
See merge request mesa/vulkan-wsi-layer!110
2024-09-19 10:06:16 +00:00
ginujacob
0cee10aa6f Advertise VK_EXT_present_timing features.
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
2024-09-17 11:31:46 +01:00
Rosen Zhelev
04fe972216 Merge 'Fix wsign-compare warning' into 'main'
See merge request mesa/vulkan-wsi-layer!109
2024-09-16 16:43:42 +00:00
Rosen Zhelev
e7c95099b6 Merge 'Guard swapchain maintenance features with experimental flag' into 'main'
See merge request mesa/vulkan-wsi-layer!108
2024-09-16 13:23:03 +00:00
Rosen Zhelev
7d3f40f2ec Merge 'Destroy attached objects before destroying the queue' into 'main'
See merge request mesa/vulkan-wsi-layer!106
2024-09-13 15:21:24 +00:00
Dennis Tsiang
7e27d1d762 Guard swapchain maintenance features with experimental flag
The feature is still experimental so we should guard it with the flag
until it's ready to be used.

Change-Id: I3f10f730ca916374241fdcdceaf332672788040d
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2024-09-05 16:52:48 +01:00
Dennis Tsiang
b565608724 Fix wsign-compare warning
Compiler warning was being flagged between the integer comparisons as
we were comparing a int with a size_t. This commit resolves the
warning by updating the int to a size_t.

Change-Id: Ibcb72ac9abb6c8e18bc8aa1e33efadc9ef79a564
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2024-09-05 10:30:05 +01:00
Normunds Rieksts
af44f50be3 Add support for VkPresentIdKHR structure
Adds support for handling the present IDs privided by the VkPresentIdKHR
structure that is exposed by the VK_KHR_present_id extension.

Change-Id: If2dfe2cf942f376729b5c0dec79bcfa0c0b49738
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2024-08-29 14:22:30 +01:00
Iason Paraskevopoulos
d487eede9e Destroy attached objects before destroying the queue
Reorganizes the wayland::surface's member variables in a way that
the objects attached to the queue are destroyed before the queue.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: Ifbc3f285005ae01b0cc75d2827e424db58c392e1
2024-08-21 17:28:48 +01:00
Dennis Tsiang
b1f9e5811a Add initial support for VK_KHR_present_id
Layer updated to advertise support for the VK_KHR_present_id
extension. vkGetPhysicalDeviceFeatures2KHR and vkCreateDevice updated
to handle the new struct.

Also add the extensions enabled by the layer to the
instance_data and device_data objects so that the layer can correctly
check which extensions have been enabled.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Change-Id: I71ae2b28c94d3f16b485a06094712d6c3f6c7e77
2024-08-20 11:46:07 +00:00
Fufu Fang
743f00f9bb Merge branch 'main' into 'swapchain_maintenance_new' 2024-08-19 12:20:16 +00:00
ginujacob
0a293fcfa9 VK_EXT_present_timing changes for the layer's json file.
Adding the entry-points and definitions required for the
VK_EXT_present_timing feature.

Signed-off-by: Ginu Jacob <ginu.jacob@arm.com>
Change-Id: I5f388b50d12fe32556676c4de0d37c95e1ff611b
2024-08-15 12:01:36 +01:00
Angeliki Agathi Tsintzira
1fa0ac21f3 Fix the number of planes calculation
Previously, the number of planes was incorrectly calculated.
The number of planes for non-linear images was the format
planes from wsialloc instead of the memory planes expected
by the implementation.

Additionally, the VK_IMAGE_CREATE_DISJOINT_BIT was based on
the format planes during image creation, instead of using the
allocation planes from wsialloc.

This commit corrects these issues by ensuring the plane count
and disjoint bit is set based on the appropriate memory planes.

Signed-off-by: Angeliki Agathi Tsintzira <angelikiagathi.tsintzira@arm.com>
Change-Id: I47ca4a0c710cdf21d94705c57f08de4f04b3a761
2024-08-13 19:27:55 +01:00
Dennis Tsiang
7f428885e1 Refactor compatible present mode functionality
Refactor the compatible present mode functionality into a new class
compatible_present_modes.

Change-Id: I801f41ba16d9c5693f1aaa1e95e9eb2c9c4f5b59
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
2024-08-13 19:27:55 +01:00