GLSL: Promote HLSL entry-point renaming code to be used by GLSL as well.
Fixes #1045.
This commit is contained in:
parent
4f4683d251
commit
9855bdad00
16 changed files with 1066 additions and 957 deletions
|
|
@ -49,9 +49,10 @@ namespace glslang {
|
|||
|
||||
TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins,
|
||||
int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language,
|
||||
TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) :
|
||||
TInfoSink& infoSink, bool forwardCompatible, EShMessages messages,
|
||||
const TString* entryPoint) :
|
||||
TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language,
|
||||
infoSink, forwardCompatible, messages),
|
||||
infoSink, forwardCompatible, messages, entryPoint),
|
||||
inMain(false),
|
||||
blockName(nullptr),
|
||||
limits(resources.limits),
|
||||
|
|
@ -88,6 +89,9 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b
|
|||
|
||||
if (language == EShLangGeometry)
|
||||
globalOutputDefaults.layoutStream = 0;
|
||||
|
||||
if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main")
|
||||
infoSink.info.message(EPrefixError, "Source entry point must be \"main\"");
|
||||
}
|
||||
|
||||
TParseContext::~TParseContext()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue