diff options
author | Zhao Jian <jian.j.zhao@intel.com> | 2010-11-24 16:11:43 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-11-24 16:11:43 -0800 |
commit | f6aa22a7eb341ab87483c225d613872d01eb17f2 (patch) | |
tree | 7e36de3404e51413e28ea72e6a2465b23f134c05 /tests/shaders/glsl-array-compare.shader_test | |
parent | f863b1e78d4ede1c4a620b40f4bada8d20f9761a (diff) |
Add test case from FDO bug 31883.
Diffstat (limited to 'tests/shaders/glsl-array-compare.shader_test')
-rw-r--r-- | tests/shaders/glsl-array-compare.shader_test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/shaders/glsl-array-compare.shader_test b/tests/shaders/glsl-array-compare.shader_test new file mode 100644 index 000000000..6beb8b413 --- /dev/null +++ b/tests/shaders/glsl-array-compare.shader_test @@ -0,0 +1,30 @@ +[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[2](3.3, 3.5); + float fff[2] = float[2](3.3, 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 |