Fix crash with varying global vector types when emitting header file.

This commit is contained in:
Matt Pharr
2011-09-09 09:16:59 -07:00
parent 5dedb6f836
commit 32da8e11b4

View File

@@ -1121,6 +1121,12 @@ lEmitVectorTypedefs(const std::vector<const VectorType *> &types, FILE *file) {
for (unsigned int i = 0; i < types.size(); ++i) {
std::string baseDecl;
const VectorType *vt = types[i]->GetAsNonConstType();
if (!vt->IsUniformType())
// Varying stuff shouldn't be visibile to / used by the
// application, so at least make it not simple to access it by
// not declaring the type here...
continue;
int size = vt->GetElementCount();
baseDecl = vt->GetBaseType()->GetCDeclaration("");