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

shadergen doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.8.3
    • Qt Shader Tools
    • None
    • Integrity, Windows

      Issue

      [Shadergen tool|https://doc.qt.io/qt-6/qtquick3d-tool-shadergen.html] doesn't eliminate "Generate Shader" step in launch.

      "Generate Shader" step is found here: 

      https://doc.qt.io/qtcreator/creator-qml-performance-monitor.html#analyzing-qt-quick-3d-events

      In the sample project, robot arm sample, was used to reproduce the issue.

      The repository is here: https://git.qt.io/mikio_hirai/shadergentest#

      Qt Quick 3D is used in these files in this project:

      1. https://git.qt.io/mikio_hirai/shadergentest/-/blob/master/content/MainScreen.ui.qml?ref_type=heads
      2. https://git.qt.io/mikio_hirai/shadergentest/-/blob/master/content/RoboticArm.ui.qml?ref_type=heads

      content/CMakeLists.txt has qt6_add_materials(), like so: https://git.qt.io/mikio_hirai/shadergentest/-/blob/master/content/CMakeLists.txt?ref_type=heads#L5

      this generated resources like so:

      https://git.qt.io/mikio_hirai/shadergentest/-/tree/master/build/Desktop_Qt_6_8_3_MinGW_64_bit-Debug/content/.rcc?ref_type=heads

      However, when the app is run, it still seems to go through "Generate Shader" step in launch.
      *Generate Shader is taking longer because of log output caused by QT_RHI_SHADER_DEBUG=1.

      You can see the console output with the attached log.txt.

       

        1. image-2025-08-08-15-25-31-602.png
          107 kB
          Mikio Hirai
        2. after.png
          67 kB
          Mikio Hirai
        3. log.txt
          59 kB
          Mikio Hirai
        4. after.qtd
          1.48 MB
          Mikio Hirai
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lagocs Laszlo Agocs
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes