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

QShaderBaker / qsb : how to ensure shared variable names ?

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.0, 5.15.1
    • Qt RHI
    • None
    • Linux/X11

    Description

      Hello,
      consider the attached shaders.
      When passing them through qsb (or QShaderBaker), the generated names for the structures aren't the same across vertex and fragment:

      • In the vertex shader, the renderer_t instance is assigned _48.
      • In the fragment shader, the material_t instance is assigned _48.

      This then causes a shader link failure, with the following error (using the RHI GL backend):

      Warning: Failed to link shader program: error: uniform `_48' declared as type `material_t' and type `renderer_t'.

      But this does not seem to be something on which we have control as a user - the most meaningful thing would be to have a QShaderProgramBaker which would take all the stages and take the previously-generated variable names into account while baking the shaders ?

      Attachments

        1. bug.vert
          0.9 kB
        2. bug.frag
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            jcelerier Jean-Michaël Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes