summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-const-builtin-notEqual.shader_test
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-07-26 18:45:17 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-07-28 15:51:00 -0700
commita4fd613190b074e64ad220f08e69da2c97f8f7b2 (patch)
treef0037c4de72d938c4cfc5dc8d28abceb1c8d6861 /tests/shaders/glsl-const-builtin-notEqual.shader_test
parentfbcf95983fe4ea7dd98cb8bab56a78d78239d39a (diff)
Improve GLSL constant builtin tests.
Most of these are new, but I updated many old ones to test more values, and values strictly between 0.0 and 1.0. This ensures we don't accidentally pass because a wrong result was clamped to that interval.
Diffstat (limited to 'tests/shaders/glsl-const-builtin-notEqual.shader_test')
-rw-r--r--tests/shaders/glsl-const-builtin-notEqual.shader_test22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/shaders/glsl-const-builtin-notEqual.shader_test b/tests/shaders/glsl-const-builtin-notEqual.shader_test
new file mode 100644
index 000000000..44538f496
--- /dev/null
+++ b/tests/shaders/glsl-const-builtin-notEqual.shader_test
@@ -0,0 +1,22 @@
+[require]
+GL >= 2.0
+GLSL >= 1.20
+
+[vertex shader file]
+glsl-mvp.vert
+
+[fragment shader]
+#version 120
+void main() {
+ const vec3 small = vec3(1.0, 2.0, 3.0);
+ const vec3 large = vec3(0.5, 2.0, 6.0);
+ const bvec3 result = notEqual(large, small);
+ gl_FragColor = vec4(result, 1.0);
+}
+
+[test]
+clear color 0.0 0.0 0.0 0.0
+clear
+ortho
+draw rect 10 10 10 10
+probe rgb 15 15 1.0 0.0 1.0