Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1, 5.3.0
-
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.