Commit graph

8 commits

Author SHA1 Message Date
Normunds Rieksts
94dd9840c9 Implement support for marking frame boundaries 2024-10-01 15:18:22 +00:00
Normunds Rieksts
566a6ee68d Extend TRY macro to print out error messages
Extends the TRY macros exposed by the helper header to be able to print
out error messages.

Change-Id: I61c607376304ba744a95dd6782bb29653235096a
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2022-11-24 11:24:34 +00:00
Dennis Tsiang
292a3c14d7 Decouple creation, allocation and binding of images from Wayland backend
A lot of the steps involved in creating a VkImage, allocating backing
memory, and binding the VkImage to the memory do not rely specifically
on Wayland features and could be common to other WSI backends.

This commit attempts to decouple the create_and_bind_swapchain_image()
function in the wsi/wayland/swapchain.cpp from Wayland and wsialloc
specific parts, and instead move the independent parts related to
external memory management to a new external_memory class. This will
allow the independent code to be re-used in future WSI backends.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Change-Id: I8c13ccbbfaef0d345fcd06192e6de484dd53645f
2022-10-21 15:28:09 +00:00
Dennis Tsiang
2bc2109194 Add support for VK_EXT_image_compression_control_swapchain
Implement support for VK_EXT_image_compression_control_swapchain
for both the Wayland and the headless windowing systems.
The extension can be conditionally enabled through the new build option
BUILD_WSI_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN. Compiling with this
option enabled requires recent Vulkan headers (1.3.213)
Note also that support in the layer is enabled conditionally to
the ICD supporting VK_EXT_image_compression_control.

Update the WSIALLOC interface to version 2 and add support to
prefer selection of a format with the highest fixed rate compression
from the formats provided. This is used to pick a fixed rate
compression when VK_IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT is
specified during swapchain creation.

Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Signed-off-by: Rosen Zhelev <rosen.zhelev@arm.com>
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
Change-Id: Ie37e6901042a65f2a408e428a705b5a24227b262
2022-05-25 16:49:52 +01:00
David Harvey-Macaulay
ba0684b5e0 Mark fences and semaphores as already signalled in AcquireNextImage
The VK_KHR_external_[fence|semaphore]_fd extensions allow sync
primitives to be signalled without the use of QueueSubmit. Using these
extensions in AcquireNextImage instead of using QueueSubmit offers two
advantages: (1) there is no waiting for work to complete in the queue
before the primitives are signalled and (2) there is no data race if
the application happens to call QueueSubmit on the same queue at the
same time.

The QueueSubmit method of signalling sync primitives continues to be
used for ICDs that do not support the external FD extensions.

Signed-off-by: David Harvey-Macaulay <david.harvey-macaulay@arm.com>
Change-Id: Ib4a922d44430110e2353a4e0221e27017e72abab
2022-02-08 15:27:29 +00:00
Normunds Rieksts
86fa15a8a2 Fix OOM issue
Fixes an issue where there was a chance that an exception would be
thrown when out of memory rather than returning an
appropriate VkResult code.

Additionally introduces a noncopyable utility class that can be used to
mark classes that should not have copy semantics

Change-Id: I1f84dc9bb1ea96db2a88a90d56adbee78b17c5e3
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
2021-11-11 18:27:31 +00:00
Dennis Tsiang
b348247fbe Fix formatting issues
All files in the project should have an empty line at the EOF. Necessary
for some pre-processing tools.

Change-Id: Ic4502588f2733f669fc1edc898258f8589c484c6
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2021-10-29 08:51:25 +00:00
Dennis Tsiang
b4db2258ab Add support for some Vulkan 1.1 structs
This commit adds support for VkBindImageMemorySwapchainInfoKHR and
VkImageSwapchainCreateInfoKHR.

Change-Id: I3d87cd7df380e59ceb386f08437c5d6f09dcee1f
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2021-09-23 15:35:51 +01:00