Fix #2366, fix #2358, correctly separate out numerical feature checking

We need separate concepts for
 - total set of extensions ever enabled, for the back end
 - current state of extensions, for parsing
 - the set of features currently enabled for building the AST
This commit is contained in:
johnkslang
2020-08-14 08:40:06 -06:00
parent 7d66a5d4be
commit 01384725c2
8 changed files with 109 additions and 74 deletions

View File

@@ -1444,7 +1444,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion,
// Add the source extensions
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
for (auto it = sourceExtensions.begin(); it != sourceExtensions.end(); ++it)
builder.addSourceExtension(it->first.c_str());
builder.addSourceExtension(it->c_str());
// Add the top-level modes for this shader.