Create separate OpSource for each included file
This commit is contained in:
@@ -1297,6 +1297,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
|
||||
text.append("#line 1\n");
|
||||
text.append(glslangIntermediate->getSourceText());
|
||||
builder.setSourceText(text);
|
||||
// Pass name and text for all included files
|
||||
const std::map<std::string, std::string>& include_txt = glslangIntermediate->getIncludeText();
|
||||
for (auto iItr = include_txt.begin(); iItr != include_txt.end(); ++iItr)
|
||||
builder.addInclude(iItr->first, iItr->second);
|
||||
}
|
||||
stdBuiltins = builder.import("GLSL.std.450");
|
||||
if (glslangIntermediate->usingVulkanMemoryModel()) {
|
||||
|
||||
Reference in New Issue
Block a user