GLSL: Promote HLSL entry-point renaming code to be used by GLSL as well.
Fixes #1045.
This commit is contained in:
@@ -58,11 +58,10 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
|
||||
const TString sourceEntryPointName,
|
||||
bool forwardCompatible, EShMessages messages) :
|
||||
TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, infoSink,
|
||||
forwardCompatible, messages),
|
||||
forwardCompatible, messages, &sourceEntryPointName),
|
||||
annotationNestingLevel(0),
|
||||
inputPatch(nullptr),
|
||||
nextInLocation(0), nextOutLocation(0),
|
||||
sourceEntryPointName(sourceEntryPointName),
|
||||
entryPointFunction(nullptr),
|
||||
entryPointFunctionBody(nullptr),
|
||||
gsStreamOutput(nullptr),
|
||||
@@ -8710,7 +8709,7 @@ void HlslParseContext::popNamespace()
|
||||
|
||||
// Use the class/struct nesting string to create a global name for
|
||||
// a member of a class/struct.
|
||||
void HlslParseContext::getFullNamespaceName(const TString*& name) const
|
||||
void HlslParseContext::getFullNamespaceName(TString*& name) const
|
||||
{
|
||||
if (currentTypePrefix.size() == 0)
|
||||
return;
|
||||
@@ -8726,15 +8725,6 @@ void HlslParseContext::addScopeMangler(TString& name)
|
||||
name.append(scopeMangler);
|
||||
}
|
||||
|
||||
// Potentially rename shader entry point function
|
||||
void HlslParseContext::renameShaderFunction(const TString*& name) const
|
||||
{
|
||||
// Replace the entry point name given in the shader with the real entry point name,
|
||||
// if there is a substitution.
|
||||
if (name != nullptr && *name == sourceEntryPointName)
|
||||
name = NewPoolTString(intermediate.getEntryPointName().c_str());
|
||||
}
|
||||
|
||||
// Return true if this has uniform-interface like decorations.
|
||||
bool HlslParseContext::hasUniform(const TQualifier& qualifier) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user