summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-const-builtin-log.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-log.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-log.shader_test')
-rw-r--r--tests/shaders/glsl-const-builtin-log.shader_test24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/shaders/glsl-const-builtin-log.shader_test b/tests/shaders/glsl-const-builtin-log.shader_test
new file mode 100644
index 000000000..8ae45f020
--- /dev/null
+++ b/tests/shaders/glsl-const-builtin-log.shader_test
@@ -0,0 +1,24 @@
+[require]
+GL >= 2.0
+GLSL >= 1.20
+
+[vertex shader file]
+glsl-mvp.vert
+
+[fragment shader]
+#version 120
+void main()
+{
+ const vec3 v = log(vec3(1.0, 0.1353352832366127, 54.598150033144236));
+ if (v == vec3(0.0, -2.0, 4.0))
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+ else
+ gl_FragColor = vec4(0.0, 1.0, 0.0, 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 0 1 0