layers: Handle oldSwapchain image reuse#11990
Conversation
|
CI Vulkan-ValidationLayers build queued with queue ID 692038. |
|
CI Vulkan-ValidationLayers build # 22968 running. |
|
Need to investigate
|
|
CI Vulkan-ValidationLayers build # 22968 failed. |
oldSwapchain images can be reused by the new swapchain. This change handles this scenario when handle wrapping is not enabled
f06b9f5 to
7ccca6d
Compare
|
CI Vulkan-ValidationLayers build queued with queue ID 692298. |
|
CI Vulkan-ValidationLayers build # 22973 running. |
spencer-lunarg
left a comment
There was a problem hiding this comment.
thanks for clarifying and taking care of the oldSwapchain stuff!
|
CI Vulkan-ValidationLayers build # 22973 passed. |
oldSwapchainimages can be reused by the new swapchain. This PR handles this when handle wrapping is not enabled.I updated the state tracker and thread safety tracker to account for the reuse of swapchain images. Potentially, other trackers may also need to be updated, but I'd prefer to address that later once there's specific evidence and this change has been tested for some time.
Closes #11939
ADDITIONAL CONTEXT: Swapchain image handle reuse is a bit different comparing to handle reuse in most (all?) other cases. In a typical case of handle reuse we a) delete resource, then b) try to create another resource and the driver reuses the handle of deleted resource. At any given moment the handle is associated with a single object. In most cases that can be naturally handled by the VVL (Delete has to properly cleanup resources).
With swapchain it is different. If oldSwapchain is used then both swapchains exist at the same time. The image handle can be associated with two swapchain objects. That's why special support is needed (Delete can't unconditionally cleanup swapchain image handles). I don't know of any other example in Vulkan that also requires such handling.