I fail to run some shader test which has uniform arrays in its vertex and uniform shaders, and it failed in its link stage, the error is something like: Failed to link: error: initializers for uniform `f' have differing values Couldn't find uniform for initializer f Couldn't find uniform for initializer f I tested on Piketon with: Libdrm: (master)2.4.22-6-g0a1ff35c70730160973715b82112cd97c62ac13e Mesa: (master)aa43176ebd26227947b07221f4e475c52bd7a76b Xserver: (master)xorg-server-1.9.0-178-g1a0d9324b3d9fd93e685066e0e5cea0611878c0d Xf86_video_intel: (master)2.12.902-24-gb066ddda31e40afa652ae51ffc35025ac3ef6f2a Kernel_unstable: (drm-intel-next)176f28ebf4303b4f7e3a5bd8be7842a8bbecd9c3
Created attachment 39943 [details] glsl uniform array in vertext and fragment shader
And the GLSL spec 1.20 and 1.40 all had a section of uniform saying this: "The uniform qualifier can be used with any of the basic data types, or when declaring a variable whose type is a structure, or an array of any of these.If multiple shaders are linked together, then they will share a single global uniform name space. Hence,the types and initializers of uniform variables with the same name must match across all shaders that are linked into a single executable. It is legal for some shaders to provide an initializer for a particular uniform variable, while another shader does not, but all provided initializers must be equal."
Comment on attachment 39943 [details] glsl uniform array in vertext and fragment shader There is a typo in it.
Created attachment 39972 [details] glsl uniform array in vertext and fragment shader
I've committed the attachment id=39972 to piglit.
Suggesting this as higher priority. It impacts many of our testcases so it will be good to get fixed first.
Fixed in Mesa commit b381eff1411dea5b9e0c9fbc8641a8760052b2eb. Changing status to RESOLVED/FIXED.
(In reply to comment #7) > Fixed in Mesa commit b381eff1411dea5b9e0c9fbc8641a8760052b2eb. > Changing status to RESOLVED/FIXED. Yes. It was fixed by Mesa commit b381eff1411dea5b9e0c9fbc8641a8760052b2eb. verified.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.