[Piglit] [PATCH] arb_tessellation_shader: Add test for unsized array with 2 shaders
Chris Forbes
chrisf at ijw.co.nz
Wed Sep 17 02:18:32 PDT 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
...utput-size-declared-in-other-shader.shader_test | 52 ++++++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
diff --git a/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test b/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
new file mode 100644
index 0000000..50b33bf
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
@@ -0,0 +1,52 @@
+# Not all shaders linked together are required to declare the output
+# vertex count -- but those shaders which do not, must not call .length()
+# or do anything else which requires the length of an unsized output array to
+# be known.
+
+[require]
+GLSL >= 1.50
+GL_ARB_tessellation_shader
+
+[vertex shader]
+
+void main() {
+}
+
+[tessellation control shader]
+#extension GL_ARB_tessellation_shader: require
+layout(vertices = 3) out;
+
+void f();
+
+void main() {
+ gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
+ gl_TessLevelInner = float[2](0.0, 0.0);
+
+ f();
+}
+
+[tessellation control shader]
+#extension GL_ARB_tessellation_shader: require
+
+void f() {
+ gl_out[gl_InvocationID].gl_Position = vec4(0);
+}
+
+[tessellation evaluation shader]
+#extension GL_ARB_tessellation_shader: require
+
+layout (triangles) in;
+
+void main() {
+ gl_Position = vec4(0);
+}
+
+[fragment shader]
+void main()
+{
+ gl_FragColor = vec4(0);
+}
+
+
+[test]
+link success
--
2.1.0
More information about the Piglit
mailing list