summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/all.tests1
-rw-r--r--tests/shaders/glsl-floating-constant-120.shader_test24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests
index f599f2854..967a866f3 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -214,6 +214,7 @@ add_plain_test(shaders, 'glsl-reload-source')
add_plain_test(shaders, 'glsl-uniform-out-of-bounds')
add_plain_test(shaders, 'glsl-uniform-update')
add_plain_test(shaders, 'glsl-unused-varying')
+add_shader_generic(shaders, 'glsl-floating-constant-120')
add_shader_generic(shaders, 'glsl-fs-add-masked')
add_shader_generic(shaders, 'glsl-fs-asin')
add_shader_generic(shaders, 'glsl-fs-atan-1')
diff --git a/tests/shaders/glsl-floating-constant-120.shader_test b/tests/shaders/glsl-floating-constant-120.shader_test
new file mode 100644
index 000000000..9a0509ae1
--- /dev/null
+++ b/tests/shaders/glsl-floating-constant-120.shader_test
@@ -0,0 +1,24 @@
+[require]
+GL >= 2.0
+GLSL >= 1.20
+
+[vertex shader]
+void main()
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+
+void main()
+{
+ float f1 = 1f;
+ float f2 = 0.5F;
+
+ gl_FragColor = vec4(f2, f1, 0.0, 0.0);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe rgba 1 1 0.5 1.0 0.0 0.0