diff options
Diffstat (limited to 'src/compiler/translator/Compiler.cpp')
-rw-r--r-- | src/compiler/translator/Compiler.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp index ec49d33b3d..f62b2e93f8 100644 --- a/src/compiler/translator/Compiler.cpp +++ b/src/compiler/translator/Compiler.cpp @@ -774,11 +774,6 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root, return false; } - if (shouldLimitTypeSizes() && !ValidateTypeSizeLimitations(root, &mSymbolTable, &mDiagnostics)) - { - return false; - } - if (!ValidateFragColorAndFragData(mShaderType, mShaderVersion, mSymbolTable, &mDiagnostics)) { return false; @@ -1060,6 +1055,13 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root, return false; } + // Run after RemoveUnreferencedVariables, validate that the shader does not have excessively + // large variables. + if (shouldLimitTypeSizes() && !ValidateTypeSizeLimitations(root, &mSymbolTable, &mDiagnostics)) + { + return false; + } + // Built-in function emulation needs to happen after validateLimitations pass. GetGlobalPoolAllocator()->lock(); initBuiltInFunctionEmulator(&mBuiltInFunctionEmulator, compileOptions); |