Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85791

Vulkan Validation Error VUID-VkSwapchainCreateInfoKHR-minImageCount-01271

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2: Important
    • Resolution: Done
    • 5.15.0
    • 5.15.9, 6.0.1, 6.1.0 Alpha
    • GUI: Vulkan
    • None
    • Linux/X11
    • 2c3fabfafd6064e0678e52d211da4364e996ad13 (qt/qtbase/6.0) f6cb24f4c0f1f48f9010ba78670577ff5643132f (qt/qtbase/dev) 87ce625b2bb845e41ebb766f43b801d448fed8b5 (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      When enabling the VK_LAYER_KHRONOS_validation layer when compiling the hellovulkantriangle example, the following validation error is printed:

      vkDebug: Validation: 0: Validation Error: [ VUID-VkSwapchainCreateInfoKHR-minImageCount-01271 ] Object 0: handle = 0x557dcbbd89d0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xe18476f3 | vkCreateSwapchainKHR() called with minImageCount = 2, which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = 3, maxImageCount = 0). The Vulkan spec states: minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://github.com/KhronosGroup/Vulkan-Docs/search?q=)VUID-VkSwapchainCreateInfoKHR-minImageCount-01271)

      Looking at the creation of the vulkan swapchain in  qvulkanwindow.cpp , I can see that qt uses a qBound to determine a value between minImageCount, maxImageCount.

      The problem is that it does not take into account the fact maxImageCount can have a value of 0, which means that there are no actual maximum limit the amount of swapchain images as explained in vulkan documentation .

      However, the qt implementation of QVulkanWindow does not allow to manually change the amount of swapchain images.

      Since this is the first time reporting a bug to qt, let me know if more information is needed.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            kwon-young Kwon-Young Choi
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes