--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in vec4 color;
+out VertexOut
+{
+ vec2 texcoord;
+ vec4 color;
+} vs_out;
+void main()
+{
+ vs_out.texcoord = position.xy*0.5+0.5;
+ vs_out.color = color;
+ gl_Position = position;
+}
+
+#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
+void main()
+{
+ frag_color = vs_out.color;
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+layout(location=1) in vec4 color;
+out VertexOut
+{
+ vec2 texcoord;
+ vec4 color;
+} vs_out;
+void main()
+{
+ vs_out.texcoord = position.xy*0.5+0.5;
+ vs_out.color = color;
+ gl_Position = position;
+}
+*/
+
+/* Expected output: fragment
+layout(location=0) out vec4 frag_color;
+in VertexOut
+{
+ vec2 texcoord;
+ vec4 color;
+} vs_out;
+void main()
+{
+ frag_color = vs_out.color;
+}
+*/
--- /dev/null
+uniform Color
+{
+ vec4 tint;
+} global_color;
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in vec4 color;
+out VertexOut
+{
+ vec2 texcoord;
+};
+out VertexOut2
+{
+ vec4 color;
+} vs_out;
+void main()
+{
+ texcoord = position.xy*0.5+0.5;
+ vs_out.color = color*global_color.tint;
+ gl_Position = position;
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+void main()
+{
+ gl_Position = position;
+}
+*/