diff options
author | Vinson Lee <vlee@vmware.com> | 2010-11-24 23:34:35 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-11-24 23:34:35 -0800 |
commit | 60f55209b9556b61634b89b0b900a3cda656c863 (patch) | |
tree | 4a33d363cea0b3888b3dc403ce6f9bf9ff829ad3 /tests/shaders/glsl-array-compare-02.shader_test | |
parent | bed2eb8cb02a18b8b7f138d15c73a1c885795e71 (diff) |
glsl-array-compare-02: Test arrays initialized after declaration.
This is the same test as glsl-array-compare but with the arrays
initialized after declaration.
Diffstat (limited to 'tests/shaders/glsl-array-compare-02.shader_test')
-rw-r--r-- | tests/shaders/glsl-array-compare-02.shader_test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/shaders/glsl-array-compare-02.shader_test b/tests/shaders/glsl-array-compare-02.shader_test new file mode 100644 index 000000000..dbef152a6 --- /dev/null +++ b/tests/shaders/glsl-array-compare-02.shader_test @@ -0,0 +1,33 @@ +[require] +GL >= 2.0 +GLSL >= 1.10 + +[vertex shader] +#version 120 +/* Verify that two arrays can be directly compared correctly. + */ +void main() +{ + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 + +void main() +{ + float ff[2]; + float fff[2]; + + ff[0] = fff[0] = 3.3; + ff[1] = fff[1] = 3.5; + + if (fff != ff) + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); + else + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 |