[Piglit] [PATCH 2/8] arb_tessellation_shader/execution/trivial: new trivial tess test

Marek Olšák maraeo at gmail.com
Mon Apr 10 21:01:37 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 .../execution/trivial.shader_test                  | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 tests/spec/arb_tessellation_shader/execution/trivial.shader_test

diff --git a/tests/spec/arb_tessellation_shader/execution/trivial.shader_test b/tests/spec/arb_tessellation_shader/execution/trivial.shader_test
new file mode 100644
index 0000000..adbdeef
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/execution/trivial.shader_test
@@ -0,0 +1,54 @@
+# Test a set of simple pass-through tessellation shaders
+
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+
+[vertex shader]
+#version 150
+
+void main()
+{
+}
+
+[tessellation control shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(vertices = 4) out;
+
+void main()
+{
+	gl_TessLevelInner[0] = 1.0;
+	gl_TessLevelInner[1] = 1.0;
+	gl_TessLevelOuter[0] = 1.0;
+	gl_TessLevelOuter[1] = 1.0;
+	gl_TessLevelOuter[2] = 1.0;
+	gl_TessLevelOuter[3] = 1.0;
+}
+
+[tessellation evaluation shader]
+#version 150
+#extension GL_ARB_tessellation_shader : require
+
+layout(quads, equal_spacing) in;
+
+void main()
+{
+	gl_Position = vec4(gl_TessCoord.x * 2 - 1, gl_TessCoord.y * 2 - 1, 0, 1);
+}
+
+[fragment shader]
+#version 150
+
+void main()
+{
+	gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
+}
+
+[test]
+clear color 0.1 0.1 0.1 0.1
+clear
+patch parameter vertices 4
+draw arrays GL_PATCHES 0 4
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.7.4



More information about the Piglit mailing list