From 4e0859b707a350e99b396eb78e17b470ae7207d8 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 12 Apr 2010 18:33:15 -0700 Subject: shaders: Add generic test that replicates glsl-fs-log2 --- tests/shaders/glsl-fs-log2.shader_test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/shaders/glsl-fs-log2.shader_test diff --git a/tests/shaders/glsl-fs-log2.shader_test b/tests/shaders/glsl-fs-log2.shader_test new file mode 100644 index 000000000..b6049eb59 --- /dev/null +++ b/tests/shaders/glsl-fs-log2.shader_test @@ -0,0 +1,26 @@ +[require] +GL >= 2.0 +GLSL >= 1.10 + +[vertex shader] +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; +} + +[fragment shader] +uniform vec4 args1, args2; + +void main() +{ + gl_FragColor = log2(args1) + args2; +} + +[test] +clear color 1.0 0.0 0.0 0.0 +clear +ortho +uniform args1 vec4 1.0 2.0 4.0 0.0 +uniform args2 vec4 0.5 -0.5 -1.5 0.0 +draw rect 10 10 10 10 +probe rgb 15 15 0.5 0.5 0.5 -- cgit v1.2.3