Looks like the right thing. Reviewed-by: Chris Forbes <[email protected]>
On Mon, Mar 23, 2015 at 8:50 PM, Tapani Pälli <[email protected]> wrote: > Signed-off-by: Tapani Pälli <[email protected]> > --- > .../linker/intrastage-const-arrays.shader_test | 22 > ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > create mode 100644 > tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test > > diff --git a/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test > b/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test > new file mode 100644 > index 0000000..d364358 > --- /dev/null > +++ b/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test > @@ -0,0 +1,22 @@ > +# Test linking two shaders which both have array of constants. > +# https://bugs.freedesktop.org/show_bug.cgi?id=89590 > +[require] > +GLSL >= 1.20 > + > +[vertex shader] > +uniform int index; > +void main() { > + const float zs[4] = float[4](0, 0, 0, 0); > + gl_Position = vec4(zs[index]); > +} > + > +[fragment shader] > +uniform int index; > +void main() > +{ > + const vec4 colours[2] = vec4[2](vec4(1, 0, 0, 0), vec4(0, 1, 0, 0)); > + gl_FragColor = vec4(colours[index].x); > +} > + > +[test] > +link success > -- > 2.1.0 > _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
