From 32da8e11b4ad303387f51c36001a83dce02f60f1 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 9 Sep 2011 09:16:59 -0700 Subject: [PATCH] Fix crash with varying global vector types when emitting header file. --- module.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module.cpp b/module.cpp index 36747e55..cc8e46f5 100644 --- a/module.cpp +++ b/module.cpp @@ -1121,6 +1121,12 @@ lEmitVectorTypedefs(const std::vector &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("");