Skip to content

comp: Wait for release/acquire fence before destroying swapchain

Fixes validation warning when quitting Vulkan OpenXR applications like hello_xr -G Vulkan2:

VUID-vkDestroyImage-image-01000(ERROR / SPEC): msgNum: -221078694 - Validation Error: [ VUID-vkDestroyImage-image-01000 ] Object 0: handle = 0x55d4d96e4960, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf2d29b5a | Cannot call vkDestroyImage on VkImage 0xcb1c7c000000001b[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000)
    Objects: 1
        [0] 0x55d4d96e4960, type: 3, name: NULL

This is an addition to commit 77851573 that introduced this fence.

Merge request reports