[Piglit] [PATCH 5/5] OES_geometry_shader: Basic SSO IO validation tests

Ian Romanick idr at freedesktop.org
Wed Jun 29 21:32:25 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 .../user-defined-gs-input-in-block.shader_test     | 70 ++++++++++++++++++++++
 .../user-defined-gs-input-not-in-block.shader_test | 65 ++++++++++++++++++++
 2 files changed, 135 insertions(+)
 create mode 100644 tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test
 create mode 100644 tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test

diff --git a/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test b/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test
new file mode 100644
index 0000000..52bd6eb
--- /dev/null
+++ b/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test
@@ -0,0 +1,70 @@
+[require]
+GL ES >= 3.1
+GLSL ES >= 3.10
+GL_OES_geometry_shader
+SSO ENABLED
+
+[vertex shader]
+#version 310 es
+#extension GL_OES_shader_io_blocks: require
+
+in vec4 piglit_vertex;
+out Vertex {
+    vec4 c;
+} v;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+    gl_Position = piglit_vertex;
+    v.c = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[geometry shader]
+#version 310 es
+#extension GL_OES_geometry_shader: require
+#extension GL_OES_shader_io_blocks: require
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices=3) out;
+
+in gl_PerVertex {
+    vec4 gl_Position;
+} gl_in[];
+
+in Vertex {
+    vec4 c;
+} v[];
+
+out vec4 fc;
+
+void main()
+{
+    for (int i = 0; i < gl_in.length(); i++) {
+	fc = v[i].c;
+	gl_Position = gl_in[i].gl_Position;
+	EmitVertex();
+    }
+
+    EndPrimitive();
+}
+
+[fragment shader]
+#version 310 es
+
+precision highp float;
+
+in vec4 fc;
+out vec4 piglit_fragcolor;
+
+void main()
+{
+    piglit_fragcolor = fc;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
\ No newline at end of file
diff --git a/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test b/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test
new file mode 100644
index 0000000..743ab32
--- /dev/null
+++ b/tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test
@@ -0,0 +1,65 @@
+[require]
+GL ES >= 3.1
+GLSL ES >= 3.10
+GL_OES_geometry_shader
+SSO ENABLED
+
+[vertex shader]
+#version 310 es
+#extension GL_OES_shader_io_blocks: require
+
+in vec4 piglit_vertex;
+out vec4 c;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+    gl_Position = piglit_vertex;
+    c = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[geometry shader]
+#version 310 es
+#extension GL_OES_geometry_shader: require
+#extension GL_OES_shader_io_blocks: require
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices=3) out;
+
+in gl_PerVertex {
+    vec4 gl_Position;
+} gl_in[];
+
+in vec4 c[];
+out vec4 fc;
+
+void main()
+{
+    for (int i = 0; i < gl_in.length(); i++) {
+	fc = c[i];
+	gl_Position = gl_in[i].gl_Position;
+	EmitVertex();
+    }
+
+    EndPrimitive();
+}
+
+[fragment shader]
+#version 310 es
+
+precision highp float;
+
+in vec4 fc;
+out vec4 piglit_fragcolor;
+
+void main()
+{
+    piglit_fragcolor = fc;
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
\ No newline at end of file
-- 
2.5.5



More information about the Piglit mailing list