[Piglit] [PATCH 2/2] GLSL 1.50: Test that multiple shaders of version 140 and 150 can be linked together
Nicholas Mack
nichmack at gmail.com
Fri Sep 27 11:55:09 PDT 2013
---
...ons-mingled-multiple-shader-objects.shader_test | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 tests/spec/glsl-1.50/linker/versions-mingled-multiple-shader-objects.shader_test
diff --git a/tests/spec/glsl-1.50/linker/versions-mingled-multiple-shader-objects.shader_test b/tests/spec/glsl-1.50/linker/versions-mingled-multiple-shader-objects.shader_test
new file mode 100644
index 0000000..399b442
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/versions-mingled-multiple-shader-objects.shader_test
@@ -0,0 +1,52 @@
+# Tests that GLSL 1.40 and GLSL 1.50 shaders may be linked together
+#
+# GLSL 1.50 Spec, 3.3 ():
+# "Shaders declaring version 1.40 of the shading language can be linked with
+# shaders declaring version 1.50 in the same program."
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 140
+
+in vec4 a;
+
+void do_test(int b);
+
+void main()
+{
+ gl_Position = a;
+ do_test(8);
+}
+
+[vertex shader]
+#version 150
+
+void do_test(int b)
+{
+ gl_Position = vec4(b);
+}
+
+[fragment shader]
+#version 140
+
+void do_stuff(float b);
+
+void main()
+{
+ gl_FragColor = vec4(1.);
+ do_stuff(.5);
+}
+
+[fragment shader]
+#version 150
+
+void do_stuff(float b)
+{
+ gl_FragColor = vec4(b);
+}
+
+[test]
+
+
--
1.8.3.1
More information about the Piglit
mailing list