[Piglit] [PATCH 6/6] glsl-1.50: add simple test for varying interface block
Jordan Justen
jordan.l.justen at intel.com
Wed Feb 27 11:24:32 PST 2013
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
.../interface-blocks-simple-varying.shader_test | 50 ++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-simple-varying.shader_test
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-simple-varying.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-simple-varying.shader_test
new file mode 100644
index 0000000..f8f38c8
--- /dev/null
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-simple-varying.shader_test
@@ -0,0 +1,50 @@
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+in vec4 vertex;
+
+uniform vec4 color;
+
+out block {
+ vec4 a;
+} inst_a;
+
+out vec4 c;
+
+void main()
+{
+ gl_Position = vertex;
+ inst_a.a = color;
+}
+
+[fragment shader]
+#version 150
+
+in block {
+ vec4 a;
+} inst_b;
+
+void main()
+{
+ gl_FragColor = inst_b.a;
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0 1.0
+-1.0 1.0
+
+[test]
+uniform vec4 color 0.0 0.0 0.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 0.0 0.0 1.0
+
+uniform vec4 color 0.0 1.0 0.0 1.0
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 1.0
+
--
1.7.10.4
More information about the Piglit
mailing list