GLSL Spec clarification

I am using GetActiveUniform to query all the active uniforms in a compiled and linked GLSL program.

On Nvidia 66.8x uniform arrays return every element in the array through this method. (ie. uniform vec4 weights[6] returns weights[0], weights[1], weights[2]… etc) I expected just “weights” with size 6.

According to the latest spec:
If one or more elements of an array are active, GetActiveUniform will return
the name of the array in name, subject to the restrictions listed above. The type of
the array is returned in type. The size parameter contains the highest array element
index used, plus one. The compiler or linker determines the highest index used.
There will be only one active uniform reported by the GL per uniform array.

So is this a Nvidia bug or a mis reading of the spec?

Also on ATI 4.11, glGetUniformiv still returns GL_INVALID_OPERATION when getting the value of a uniform sampler. Nvidia has no problems. Is this allowed?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.