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

Error when using ShaderEffect doesn't tell the user how to fix it

    XMLWordPrintable

Details

    • 3998a53fe12da7369ab6217187f4fed4ba8dea26 (qt/qtdeclarative/dev) a4b651f666bd447e23d5bdf71842710ca9fa63ba (qt/qtdeclarative/6.2)

    Description

      Users with inline shader code will get errors like this when porting to Qt 6:

      qUncompress: Z_DATA_ERROR: Input data is corrupted
      Attempted to deserialize QShader with unknown version 0.
      ShaderEffect: Failed to deserialize QShader from :/opacity-mask.frag
      ShaderEffect: shader preparation failed for qrc:/opacity-mask.frag
      

      This doesn't tell them that they need to compile their .frag files to .qsb files. A message that says something like the following would enable the user to fix the problem on their own, and much faster:

      ShaderEffect: Failed to deserialize QShader from :/opacity-mask.frag. Shader files must be compiled to .qsb files in Qt 6. See https://doc-snapshots.qt.io/qt6-dev/qtshadertools-build.html for more information.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            mitch_curtis Mitch Curtis
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes