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

Resizing ApplicationWindow causes Vulkan validation errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 6.5.0 Beta3
    • Quick: SceneGraph
    • None
    • Linux/X11

    Description

       

      If you create a window with the Vulkan backend:

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      int main(int argc, char* argv[]) {
          qputenv("QSG_RHI_BACKEND", "vulkan");
          qputenv("QSG_RHI_DEBUG_LAYER", "1");
          QGuiApplication app(argc, argv);
          QQmlApplicationEngine engine;
          engine.load(QUrl(QStringLiteral("qrc:/qml/Test.qml")));
          if (engine.rootObjects().isEmpty())
              return -1;
          return app.exec();
      }
      

       

      with the following QML:

      import QtQuick
      import QtQuick.Controls
      ApplicationWindow {
          id: window
          title: "Resize me to cause validation errors"
          height: 1080
          visible: true
          width: 1920
          Label {
              text: window.title
          }
      }
      

      You'll wind up with a validation error like this for each window resize tick:

      vkDebug: Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x7f8108a90f20, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1675,978), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1676,976), minImageExtent = (1676,976), maxImageExtent = (1676,976). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)

      I tested a normal `QApplication` and it doesn't have such validation errors.

       

      Attachments

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

        Activity

          People

            janichol Andy Nichols
            clickingbuttons clicking buttons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes