]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/missing_geometry_layouts.glsl
Validate the presence of in/out layout qualifiers for geometry shaders
[libs/gl.git] / tests / glsl / missing_geometry_layouts.glsl
diff --git a/tests/glsl/missing_geometry_layouts.glsl b/tests/glsl/missing_geometry_layouts.glsl
new file mode 100644 (file)
index 0000000..b531e8e
--- /dev/null
@@ -0,0 +1,22 @@
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+void main()
+{
+       gl_Position = position;
+}
+
+#pragma MSP stage(geometry)
+void main()
+{
+       for(int i=0; i<3; ++i)
+       {
+               passthrough[i];
+               EmitVertex();
+       }
+}
+
+/* Expected error:
+<test>:9: No primitive type qualifier found on input
+<test>:9: No primitive type qualifier found on output
+<test>:9: No vertex count qualifier found on output
+*/