Track separate entry-point names and mangled names...
... and use each in the correct way at consumption sites. This completes issue #513.
This commit is contained in:
@@ -713,8 +713,8 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls
|
||||
builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion());
|
||||
stdBuiltins = builder.import("GLSL.std.450");
|
||||
builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450);
|
||||
shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPoint().c_str());
|
||||
entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPoint().c_str());
|
||||
shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str());
|
||||
entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str());
|
||||
|
||||
// Add the source extensions
|
||||
const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions();
|
||||
@@ -2453,9 +2453,7 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList&
|
||||
|
||||
bool TGlslangToSpvTraverser::isShaderEntryPoint(const glslang::TIntermAggregate* node)
|
||||
{
|
||||
// have to ignore mangling and just look at the base name
|
||||
size_t firstOpen = node->getName().find('(');
|
||||
return node->getName().compare(0, firstOpen, glslangIntermediate->getEntryPoint().c_str()) == 0;
|
||||
return node->getName().compare(glslangIntermediate->getEntryPointMangledName().c_str()) == 0;
|
||||
}
|
||||
|
||||
// Make all the functions, skeletally, without actually visiting their bodies.
|
||||
|
||||
Reference in New Issue
Block a user