Support exported arrays of varyings
This commit is contained in:
7
type.cpp
7
type.cpp
@@ -1426,6 +1426,7 @@ ArrayType::GetCDeclaration(const std::string &name) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int soaWidth = base->GetSOAWidth();
|
int soaWidth = base->GetSOAWidth();
|
||||||
|
int vWidth = (base->IsVaryingType()) ? g->target->getNativeVectorWidth() : 0;
|
||||||
base = base->GetAsUniformType();
|
base = base->GetAsUniformType();
|
||||||
|
|
||||||
std::string s = base->GetCDeclaration(name);
|
std::string s = base->GetCDeclaration(name);
|
||||||
@@ -1447,6 +1448,12 @@ ArrayType::GetCDeclaration(const std::string &name) const {
|
|||||||
s += buf;
|
s += buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vWidth > 0) {
|
||||||
|
char buf[16];
|
||||||
|
sprintf(buf, "[%d]", vWidth);
|
||||||
|
s += buf;
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user