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
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>
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