Skip to content

Fix bug in has_descendant_started_presenting in headless backend

If there exists two swapchains where one is a descendant of another, we need to return VK_ERROR_OUT_OF_DATE_KHR error if the application tries to present from the ancestor when the descendant has started presenting.

The has_descendant_started_presenting() function checks whether the descendant has started presenting by looking for pending images in the descendant's list of swapchain images. However, the descendant could have already presented its pending image(s) before the ancestor arrives at this check. In this scenario, the descendant will have marked the swapchain image(s) as now free, and therefore when the ancestor looks for pending images it will fail to find any. This causes the function to incorrectly return false.

This bug can be resolved by creating a new boolean member variable to track whether the swapchain has started presenting.

Change-Id: Ibc3399a4bb05f89940f0b595d25aa07b8e2a2cb8 Signed-off-by: Dennis Tsiang dennis.tsiang@arm.com Signed-off-by: Normunds Rieksts normunds.rieksts@arm.com

Merge request reports