Results 1 to 5 of 5

Thread: About the swapchain image resizing

  1. #1

    Post About the swapchain image resizing

    Some time ago I implemented swapchain image resizing in my Vulkan renderer
    using system events ( WM_SIZE and WM_EXITSIZEMOVE on Windows and

    It worked OK, but recently there was some change ( at least on my NVidia card ) :
    window resize causes vkQueuePresentKHR() function to return
    VK_ERROR_OUT_OF_DATE_KHR before system event gets a chance to resize
    swapchain images.
    It means that instead of above mentioned system events I must use
    vkGetPhysicalDeviceSurfaceCapabilitiesKHR() to obtain current swapchain image size.
    OK, I can live with that.

    But when I minimize my window - function vkCreateSwapchainKHR() returns ERROR_OUT_OF_DEVICE_MEMORY.
    It turned out that when window is minimized then function vkGetPhysicalDeviceSurfaceCapabilitiesKHR()
    returns VkSurfaceCapabilitiesKHR struct with currentExtent == {0,0}.

    So I decided to define minimal size for swapchain images : {1,1}.
    And now validation layer informs me that I cannot create such window,
    because it's bigger thanmaxImageExtent defined in VkSurfaceCapabilitiesKHR struct : {0,0}.

    Because of this - I decided to see how others implement window resizing.
    And to my surprise - they don't handle windows minimization either :
    - cube example from LunarG SDK halts infinitely when window is minimized
    - also examples written by Sascha Willems crash when window is minimized.
    I found that Sascha touched that issue ( 320 ), but left it opened.

    My questions :
    1. since when vkQueuePresentKHR() and vkAcquireNextImageKHR() must use
    swapchain images with the same size as window size ?
    Is it defined somewhere in a specification ?
    2. If that change was added to specification:
    - what was the motivation ? Lack of WM_SIZE counterparts on some platforms ?
    - what should we do when window is minimized ?
    3. If it wasn't added to specification - is it only NVidia specific ?

  2. #2
    Senior Member
    Join Date
    Dec 2013
    It's a driver issue that's still present in current drivers and not a problem with the implementation of e.g. my examples (works fine with other vendors). I reported it to nvidia some time ago but it seems they haven't fixed it yet.

  3. #3
    Which one issue we are discussing, because I wrote about two of them ?

    First one is a demand that window size must be the same as swapchain image size
    during vkQueuePresentKHR() and vkAcquireNextImageKHR() calls.

    Second one is the impossibility to recreate swapchain images when window is minimized.

  4. #4
    Senior Member
    Join Date
    Dec 2013
    I'm talking about minimizung the window. Resizes work fine for me on multiple IHVs and platforms including nv.

  5. #5
    Thank you for a clarification.
    We will wait for a fix from NVidia then.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean