KhronosGroup / KhronosGroup/Vulkan-Docs
Unclear if failed present will release the image
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
From https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1696
It is unclear if failed present will release the image.
For OOM errors this is clearly stated:
> If `vkQueuePresentKHR` fails to enqueue the corresponding set of queue operations, it may return `VK_ERROR_OUT_OF_HOST_MEMORY` or `VK_ERROR_OUT_OF_DEVICE_MEMORY`. If it does, the implementation **must** ensure that the state and contents of any resources or synchronization primitives referenced is unaffected by the call or its failure.
but for the others it is not so clearly stated.
Especially for `VK_ERROR_OUT_OF_DATE_KHR` and `VK_ERROR_SURFACE_LOST_KHR`. for which it is stated the queue operations still happen.
This is important to determine wheter it is valid to call `vkAcquireNextImageKHR` after `vkQueuePresentKHR` failed. If the present discovers the swapchain is out-of-date, the subsequent acquire should return the same error. But [VUID-vkAcquireNextImageKHR-swapchain-01802](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkAcquireNextImageKHR-swapchain-01802) could make this outright invalid usage, if the failed `vkQueuePresent` does not count as an image release. The specification needs to clarify whether this is valid usage or not.
Plus for `VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT` it is not clear if it pollutes the `semaphore` or not neither.
Contributor guide
Assessment
This issue has not been assessed yet.