From 76e69b08d962331777c7a81462de2c983bc6868e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 12 Jul 2010 13:55:51 -0700 Subject: glsl-{vs,fs}-uniform-array-*: New tests for using uniform arrays. They're used by Savage2, yet nothing but glsl-uniform-out-of-bounds were using them, and that test doesn't do rendering. --- tests/shaders/glsl-fs-uniform-array-1.shader_test | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/shaders/glsl-fs-uniform-array-1.shader_test (limited to 'tests/shaders/glsl-fs-uniform-array-1.shader_test') diff --git a/tests/shaders/glsl-fs-uniform-array-1.shader_test b/tests/shaders/glsl-fs-uniform-array-1.shader_test new file mode 100644 index 000000000..35fae4733 --- /dev/null +++ b/tests/shaders/glsl-fs-uniform-array-1.shader_test @@ -0,0 +1,24 @@ +[require] +GL >= 2.0 +GLSL >= 1.10 + +[vertex shader] +void main() +{ + gl_Position = gl_Vertex; +} + +[fragment shader] +uniform vec4 arg[4]; +void main() +{ + gl_FragColor = arg[1]; +} + +[test] +uniform vec4 arg[0] 1.0 0.0 0.0 0.0 +uniform vec4 arg[1] 0.0 1.0 0.0 0.0 +uniform vec4 arg[2] 0.0 0.0 1.0 0.0 +uniform vec4 arg[3] 1.0 0.0 1.0 0.0 +draw rect -1 -1 2 2 +probe rgb 1 1 0.0 1.0 0.0 -- cgit v1.2.3