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

Uniform location lookups inside QSGSimpleMaterialShader::resolveUniforms fails sometimes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.2.1, 5.3.0
    • Quick: SceneGraph
    • None
    • Ubuntu Linux 32bit, nVidia 560M GPU
      Embedded Linux on Omap3530, SGX530 GPU (similar to original Beagleboard)
    • 5dd2e2b895af03f0aaa0ffaef7615ff41960cec6

    Description

      When looking up uniform locations inside the resolveUniforms-function in a QSGSimpleMaterialShader-based class, some of them will not be found.

      In particular, when having multiple sampler2D-uniforms in the fragment shader, only the first one will be found. Locations for the other ones are reported as -1.

      However, if calling "program()->bind()" first, everything works as expected.

      After a discussion with Mr. Sletta on IRC, I recommend adding this "program()->bind()"-call at the end of QSGMaterialShader::initialize(). This way the program will be bound before resolveUniforms is called.

      I have reproduced the issue both on a Desktop nvidia card, as well as an embedded arm device with a SGX530-gpu.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            pyrrhula Ola Røer Thorsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes