Support exported arrays of varyings

This commit is contained in:
JCB
2013-08-20 16:14:29 -04:00
parent 0452b77169
commit 3e9d784013

View File

@@ -1426,6 +1426,7 @@ ArrayType::GetCDeclaration(const std::string &name) const {
}
int soaWidth = base->GetSOAWidth();
int vWidth = (base->IsVaryingType()) ? g->target->getNativeVectorWidth() : 0;
base = base->GetAsUniformType();
std::string s = base->GetCDeclaration(name);
@@ -1447,6 +1448,12 @@ ArrayType::GetCDeclaration(const std::string &name) const {
s += buf;
}
if (vWidth > 0) {
char buf[16];
sprintf(buf, "[%d]", vWidth);
s += buf;
}
return s;
}