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

Poor drag performance with QtQuick depending on graphics backend

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Qt RHI
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      When launching a simple Qt application (like the Qt Quick gallery) I have very poor graphical performance with D3D11 backend (either on debug or release) when interacting with the mouse.

      If I force the opengl backend by setting QSG_RHI_BACKEND to opengl, everything is fine.

      With D3D11 backend:

       

      qt.scenegraph.general: Using QRhi with backend D3D11
        graphics API debug/validation layers: 0
        QRhi profiling and debug markers: 0
      qt.scenegraph.general: threaded render loop
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
      qt.rhi.general: DXGI 1.2 = true, FLIP_DISCARD swapchain supported = true
      qt.rhi.general: Adapter 0: 'NVIDIA GeForce GTX 980' (vendor 0x10DE device 0x13C0 flags 0x0)
      qt.rhi.general:   using this adapter
      qt.rhi.general: Adapter 1: 'Microsoft Basic Render Driver' (vendor 0x1414 device 0x8C flags 0x2)
      qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
      qt.scenegraph.general: rhi texture atlas dimensions: 2048x2048
      

      With opengl backend:

       

       

      qt.scenegraph.general: Using QRhi with backend OpenGL
        graphics API debug/validation layers: 0
        QRhi profiling and debug markers: 0
      qt.scenegraph.general: threaded render loop
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
      qt.scenegraph.general: Using sg animation driver
      qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
      qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(QColorSpace::SRgb, QColorSpace::Primaries::SRgb, QColorSpace::TransferFunction::SRgb, gamma=2.31), profile  QSurfaceFormat::CompatibilityProfile)
      qt.rhi.general: OpenGL VENDOR: NVIDIA Corporation RENDERER: GeForce GTX 980/PCIe/SSE2 VERSION: 4.6.0 NVIDIA 432.00
      qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
      qt.scenegraph.general: rhi texture atlas dimensions: 2048x2048
      

       

       

      All driver are up to date on my machine.

      Note that even a very small example has the issue, like this:

       

      import QtQuick
      import QtQuick.Window
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Rectangle {
              width: 25
              height: 25
              color: "red"
      
              DragHandler {
                  target: parent
              }
          }
      }
      

      Moving the rectangle in this simple exemple look smooth with opengl backend, but auwful with D3D11 one, the rectangle is always late, and sometime seems totally fixed for half a second.

      The effect is strongger with larger windows.

      This issue is particulary diffucult to explain, and I'm trying to record my screen but the process of recording slow the computer and the issue is not visible on the recordings.

      I also tryes to profile the application, but both profile looks globally the same (which seems really normal to me):

       

       

       

        Attachments

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            greenwolf Benoît Gradit
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes