Fix exported varying bug & backwards compatibility.
This commit is contained in:
@@ -1204,7 +1204,12 @@ lEmitStructDecl(const StructType *st, std::vector<const StructType *> *emittedSt
|
||||
for (int i = 0; i < st->GetElementCount(); ++i) {
|
||||
const Type *type = st->GetElementType(i)->GetAsNonConstType();
|
||||
std::string d = type->GetCDeclaration(st->GetElementName(i));
|
||||
fprintf(file, " %s;\n", d.c_str());
|
||||
if (type->IsVaryingType()) {
|
||||
fprintf(file, " %s[%d];\n", d.c_str(), g->target->getVectorWidth());
|
||||
}
|
||||
else {
|
||||
fprintf(file, " %s;\n", d.c_str());
|
||||
}
|
||||
}
|
||||
fprintf(file, "};\n");
|
||||
fprintf(file, "#endif\n\n");
|
||||
|
||||
Reference in New Issue
Block a user