Skip to content

False positive with oldSwapchain created from a different VkSurface #10112

Closed

Description

@mahkoh

Environment:

  • OS: Arch Linux
  • GPU and driver version: Mesa 25.0
  • SDK or header version if building from repo: 1.4.313.0
  • Options enabled (synchronization, best practices, etc.):

Describe the Issue

  1. Create two VkSurfaces (A, B) from the same native window.
  2. Create a swapchain S from A.
  3. Create a swapchain T from B, passing in S as the oldSwapchain.

Expected behavior

No error.

Valid Usage ID

VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01933

Validation Error: [ VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01933 ] | MessageID = 0xe7c1ebde
vkCreateSwapchainKHR(): pCreateInfo->oldSwapchain surface is not pCreateInfo->surface.
The Vulkan spec states: If oldSwapchain is not VK_NULL_HANDLE, oldSwapchain must be a non-retired swapchain associated with native window referred to by surface (https://docs.vulkan.org/spec/latest/chapters/VK_KHR_surface/wsi.html#VUID-VkSwapchainCreateInfoKHR-oldSwapchain-01933)

oldSwapchain must be a non-retired swapchain associated with native window referred to by surface

The old swapchain, S, is, in fact, associated with the same native window referred to by B since A and B refer to the same native window.

Activity

  1. spencer-lunarg commented on May 15, 2025

    @spencer-lunarg
    Contributor

    was able to reproduce with a simple test, we currently were not tracking the Native Object underneath, plan to add a quick fix (at least for Linux where I can test)

  2. spencer-lunarg commented on May 15, 2025

    @spencer-lunarg
    Contributor

    @mahkoh thanks for raising this, I have update the code so it will no be a false positive

    I am keeping this issue open though as I want to come back in the future (when someone has time) to add proper support for that VU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    WSIWindow System Integration related issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions