--- /dev/null
+struct MaterialParameters
+{
+ vec4 color;
+};
+uniform Material
+{
+ MaterialParameters material;
+};
+uniform Transform
+{
+ mat4 mvp;
+};
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+void main()
+{
+ gl_Position = mvp*position;
+}
+
+#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
+void main()
+{
+ frag_color = material.color;
+}
+
+/* Expected output: vertex
+layout(binding=48) uniform Transform
+{
+ mat4 mvp;
+};
+layout(location=0) in vec4 position;
+void main()
+{
+ gl_Position = mvp*position;
+}
+*/
+
+/* Expected output: fragment
+struct MaterialParameters
+{
+ vec4 color;
+};
+layout(binding=64) uniform Material
+{
+ MaterialParameters material;
+};
+layout(location=0) out vec4 frag_color;
+void main()
+{
+ frag_color = material.color;
+}
+*/