XMLWordPrintable

Details

    Description

      As part of the graphics vision for Qt6 and onwards (see wiki.qt.io/QtCS2018_Graphics_Vision_2020, we should develop a common rendering hardware interface (RHI) that can be used to draw graphics on multiple backends and be used by our different products.

      An RHI has been previously explored in various efforts, including in the development of the
      Qt3D Studio Runtime, and work on making the Qt3D renderer a plugin. None of these are satisfactory in practice. It has also been discussed here: https://bugreports.qt.io/browse/QTBUG-62439

      • The API should be fit to use with major backends, such as OpenGL, Vulkan, Direct3D, Metal.
      • It should interoperate with a shader management solution that allows reusing the same shader code regardless of the RHI backend in use. (current candidate: Vulkan-flavored GLSL -> glslang -> SPIRV-Cross -> GLSL/HLSL/MSL + reflection data)
      • Having 2 frames in flight and throttling the rendering thread to vsync should be supported at minimum. Double buffering (keeping multiple versions of constant and other buffers around, depending on the memory type, when needed due a previous frame in flight using it) must be handled by the backends transparently to the application. (so this is not just a 1:1 API wrapper)
      • Minimalist approach, restricted scope, driven by the feature set of Qt Quick and Qt 3D Studio. (again, not a 1:1 API wrapper)

      Status:

      • qtbase (QRhi as private API)

      https://codereview.qt-project.org/#/c/256713/ → merged
      a number of patches on top, some merged, some open, some upcoming

      Some fairly recent manually generated qdoc documentation: https://alpqr.github.io/qtrhi/qtrhi-index.html#
      It may be advisable for anyone interested in the details to check out the QRhi introduction at https://alpqr.github.io/qtrhi/qrhi.html#details

      • The Qt Shader Tools module builds on the SPIR-V Open Source Ecosystem as described at the Khronos SPIR-V web site. Most importantly, it provides a command-line tool (qsb) to generate .qsb files.

      https://code.qt.io/cgit/qt-labs/qtshadertools.git/

      Will stay a qt-labs repo for Qt 5. TBD for Qt 6.

      • Qt Quick port

      https://codereview.qt-project.org/#/c/259447/
      and some patches on top

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              dragly Svenn-Arne Dragly
              Votes:
              6 Vote for this issue
              Watchers:
              26 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes