In particular, don't break a matrix down into columns and construct
it again. These could just be removed from the AST entirely, but the
expression resolver currently does not do node replacement and it's
easier to just skip this in the backend.
map<string, TypeDeclaration *>::const_iterator i = stage->types.find(call.name);
if(i==stage->types.end())
return;
+ else if(call.arguments.size()==1 && i->second==call.arguments[0]->type)
+ ;
else if(BasicTypeDeclaration *basic = dynamic_cast<BasicTypeDeclaration *>(i->second))
{
BasicTypeDeclaration *elem = get_element_type(*basic);
--- /dev/null
+uniform mat4 mvp;
+
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+int main()
+{
+ gl_Position = mat4(mvp)*vec4(position);
+}
+
+/* Expected output: vertex
+layout(location=0) uniform mat4 mvp;
+layout(location=0) in vec4 position;
+int main()
+{
+ gl_Position = mat4(mvp)*vec4(position);
+}
+*/