Remove GLSLANG_ANGLE

ANGLE no longer links with glslang.  This change reverts
1ef2e250fc which added a flag to strip
glslang to reduce its binary size.  This flag is no longer needed.
This commit is contained in:
Shahbaz Youssefi 2022-11-08 15:11:36 -05:00 committed by Shahbaz Youssefi
parent 5e08deae05
commit 6b2493a4d8
17 changed files with 55 additions and 156 deletions

View file

@ -298,9 +298,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
#elif defined(GLSLANG_ANGLE)
profile = ECoreProfile;
version = 450;
#endif
(*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]);
@ -322,9 +319,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
#elif defined(GLSLANG_ANGLE)
profile = ECoreProfile;
version = 450;
#endif
std::unique_ptr<TBuiltInParseables> builtInParseables(CreateBuiltInParseables(infoSink, source));
@ -371,7 +365,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source,
infoSink, commonTable, symbolTables);
#ifndef GLSLANG_ANGLE
// check for ray tracing stages
if (profile != EEsProfile && version >= 450) {
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source,
@ -399,7 +392,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS
(profile == EEsProfile && version >= 320))
InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source,
infoSink, commonTable, symbolTables);
#endif // !GLSLANG_ANGLE
#endif // !GLSLANG_WEB
return true;
@ -502,7 +494,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp
// Function to Print all builtins
void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable)
{
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
infoSink.debug << "BuiltinSymbolTable {\n";
symbolTable.dump(infoSink, true);
@ -606,7 +598,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
break;
}
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
// Correct for stage type...
switch (stage) {
case EShLangGeometry:
@ -884,7 +876,7 @@ bool ProcessDeferred(
: userInput.scanVersion(version, profile, versionNotFirstToken);
bool versionNotFound = version == 0;
if (forceDefaultVersionAndProfile && source == EShSourceGlsl) {
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound &&
(version != defaultVersion || profile != defaultProfile)) {
compiler->infoSink.info << "Warning, (version, profile) forced to be ("
@ -910,13 +902,10 @@ bool ProcessDeferred(
#ifdef GLSLANG_WEB
profile = EEsProfile;
version = 310;
#elif defined(GLSLANG_ANGLE)
profile = ECoreProfile;
version = 450;
#endif
bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst));
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
bool warnVersionNotFirst = false;
if (! versionWillBeError && versionNotFirstToken) {
if (messages & EShMsgRelaxedErrors)
@ -989,7 +978,7 @@ bool ProcessDeferred(
parseContext->setLimits(*resources);
if (! goodVersion)
parseContext->addError();
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
if (warnVersionNotFirst) {
TSourceLoc loc;
loc.init();
@ -1027,7 +1016,7 @@ bool ProcessDeferred(
return success;
}
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
// Responsible for keeping track of the most recent source string and line in
// the preprocessor and outputting newlines appropriately if the source string
@ -1250,16 +1239,14 @@ struct DoFullParse{
parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n";
}
#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate.output(parseContext.infoSink, true);
#endif
return success;
}
};
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
// Take a single compilation unit, and run the preprocessor on it.
// Return: True if there were no issues found in preprocessing,
// False if during preprocessing any unknown version, pragmas or
@ -1927,7 +1914,7 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion
&environment);
}
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
// Fill in a string with the result of preprocessing ShaderStrings
// Returns true if all extensions, pragmas and version strings were valid.
//
@ -1966,7 +1953,7 @@ const char* TShader::getInfoDebugLog()
}
TProgram::TProgram() :
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
reflection(0),
#endif
linked(false)
@ -1982,7 +1969,7 @@ TProgram::TProgram() :
TProgram::~TProgram()
{
delete infoSink;
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
delete reflection;
#endif
@ -2032,7 +2019,7 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
if (stages[stage].size() == 0)
return true;
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
int numEsShaders = 0, numNonEsShaders = 0;
for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) {
if ((*it)->intermediate->getProfile() == EEsProfile) {
@ -2088,10 +2075,8 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages)
#endif
intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0);
#ifndef GLSLANG_ANGLE
if (messages & EShMsgAST)
intermediate[stage]->output(*infoSink, true);
#endif
return intermediate[stage]->getNumErrors() == 0;
}
@ -2169,7 +2154,7 @@ const char* TProgram::getInfoDebugLog()
return infoSink->debug.c_str();
}
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
#if !defined(GLSLANG_WEB)
//
// Reflection implementation.
@ -2251,6 +2236,6 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper)
return ioMapper->doMap(pResolver, *infoSink);
}
#endif // !GLSLANG_WEB && !GLSLANG_ANGLE
#endif // !GLSLANG_WEB
} // end namespace glslang