}
if(output)
{
- if(!i->second.assignments.empty() && i->second.interface_block)
+ if((i->second.referenced || !i->second.assignments.empty()) && i->second.interface_block)
used_interface_blocks.insert(i->second.interface_block);
continue;
}
--- /dev/null
+uniform mat4 projection;
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in vec3 normal;
+out vec4 eye_vertex;
+out VertexOut
+{
+ vec4 color;
+};
+void main()
+{
+ gl_Position = projection*eye_vertex;
+ out float alpha = color.a;
+}
+
+#pragma MSP stage(fragment)
+layout(location=0) out vec4 frag_color;
+void main()
+{
+ frag_color = vec4(color.rgb, alpha);
+}
+
+/* Expected output: vertex
+uniform mat4 projection;
+out vec4 eye_vertex;
+out VertexOut
+{
+ vec4 color;
+};
+out float alpha;
+void main()
+{
+ gl_Position = projection*eye_vertex;
+ alpha = color.a;
+}
+*/
+
+/* Expected output: fragment
+layout(location=0) out vec4 frag_color;
+in VertexOut
+{
+ vec4 color;
+};
+in float alpha;
+void main()
+{
+ frag_color = vec4(color.rgb, alpha);
+}
+*/