Use GLSLANG_ANGLE to strip features to what ANGLE requires
This change strips a few features similar to GLSLANG_WEB but doesn't remove every detail like the latter. It also hardcodes profile/version to core/450. In particular, TBuiltIns::initialize is specialized to remove most of what is not supported or won't be supported by ANGLE. The result of this function is parsed with TParseContext::parseShaderStrings which is a performance bottleneck. This change shaves about 300KB off of ANGLE's binary size and reduces the cost of SetupBuiltinSymbolTable to nearly a sixth. Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
This commit is contained in:
parent
f5ed7a69d5
commit
8c49d15fbf
17 changed files with 215 additions and 103 deletions
|
|
@ -82,7 +82,7 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message)
|
|||
//
|
||||
void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
mergeCallGraphs(infoSink, unit);
|
||||
mergeModes(infoSink, unit);
|
||||
mergeTrees(infoSink, unit);
|
||||
|
|
@ -104,7 +104,7 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit)
|
|||
callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end());
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
|
||||
#define MERGE_MAX(member) member = std::max(member, unit.member)
|
||||
#define MERGE_TRUE(member) if (unit.member) member = unit.member;
|
||||
|
|
@ -533,7 +533,7 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType)
|
|||
//
|
||||
void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, bool crossStage)
|
||||
{
|
||||
#ifndef GLSLANG_WEB
|
||||
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE)
|
||||
bool writeTypeComparison = false;
|
||||
|
||||
// Types have to match
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue