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

Material system shading language rework: migrate to Vulkan-compatible GLSL

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Qt RHI, Quick: 3D
    • None

    Description

      Direct OpenGL usage is to be removed in Qt 6.0 and is replaced by rendering via the Qt Rendering Hardware Interface and the associated graphics and compute shader management machinery provided by the Qt Shader Tools module.

      See

      https://bugreports.qt.io/browse/QTBUG-70287
      https://intranet.qt.io/display/QTRD/Unleashing+the+Greyhound
      Slides 31-53 in https://github.com/alpqr/talks/blob/master/NDC_TechTown_2019/qtgraphics_ndctt2019.pdf

      With QRhi the shaders have to be migrated to Vulkan-style GLSL.

      More information about this language variant is available at https://github.com/KhronosGroup/GLSL/blob/master/extensions/khr/GL_KHR_vulkan_glsl.txt
      Note that many constructs described in the spec are not applicable or available for use in combination with QRhi.

      • At minimum the porting involves using uniform buffers for everything (the concept of individual uniforms does not exist anymore), introducing location and binding qualifiers for vertex inputs and shader resources, and possibly a few syntactical changes.
      • This also presents potentially significant changes to the rendering engine as well when it comes to shader resources (uniforms, samplers/textures).
      • It is recommended to analyze and familiarize with the similar porting work done for the Qt Quick material system in Qt 5.14. The core concepts are the same, but the Quick 3D shaders are significantly more complex and may present more challanges.
      • It has not yet been analyzed if the more complex pieces of GLSL snippets in the default and custom material library have potentially incompatible code in them.
      • This task is to be implemented in a way that the old (direct OpenGL usage, GLSL) and new (QRhi, Vulkan-style GLSL) systems can co-exist side by side, and both are usable at runtime. Switching could happen via environment variables for example.

      Attachments

        Issue Links

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

          Activity

            People

              janichol Andy Nichols
              lagocs Laszlo Agocs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4 weeks
                  4w
                  Remaining:
                  Remaining Estimate - 4 weeks
                  4w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Gerrit Reviews

                    There are no open Gerrit changes