diff options
Diffstat (limited to 'chromium/third_party/angle/src/compiler/translator/Compiler.cpp')
-rw-r--r-- | chromium/third_party/angle/src/compiler/translator/Compiler.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/chromium/third_party/angle/src/compiler/translator/Compiler.cpp b/chromium/third_party/angle/src/compiler/translator/Compiler.cpp index 9707250da65..fee3ed3bd18 100644 --- a/chromium/third_party/angle/src/compiler/translator/Compiler.cpp +++ b/chromium/third_party/angle/src/compiler/translator/Compiler.cpp @@ -153,15 +153,6 @@ TCompiler::~TCompiler() { } -bool TCompiler::shouldRunLoopAndIndexingValidation(int compileOptions) const -{ - // If compiling an ESSL 1.00 shader for WebGL, or if its been requested through the API, - // validate loop and indexing as well (to verify that the shader only uses minimal functionality - // of ESSL 1.00 as in Appendix A of the spec). - return (IsWebGLBasedSpec(shaderSpec) && shaderVersion == 100) || - (compileOptions & SH_VALIDATE_LOOP_INDEXING); -} - bool TCompiler::Init(const ShBuiltInResources& resources) { shaderVersion = 100; @@ -239,6 +230,12 @@ TIntermNode *TCompiler::compileTreeImpl(const char *const shaderStrings[], success = false; } + // If compiling an ESSL 1.00 shader for WebGL, or if its been requested through the API, + // validate loop and indexing as well (to verify that the shader only uses minimal functionality + // of ESSL 1.00 as in Appendix A of the spec). + bool validateLoopAndIndexing = (IsWebGLBasedSpec(shaderSpec) && shaderVersion == 100) || + (compileOptions & SH_VALIDATE_LOOP_INDEXING); + TIntermNode *root = nullptr; if (success) @@ -281,7 +278,7 @@ TIntermNode *TCompiler::compileTreeImpl(const char *const shaderStrings[], if (success && shaderVersion == 300 && shaderType == GL_FRAGMENT_SHADER) success = validateOutputs(root); - if (success && shouldRunLoopAndIndexingValidation(compileOptions)) + if (success && validateLoopAndIndexing) success = validateLimitations(root); if (success && (compileOptions & SH_TIMING_RESTRICTIONS)) |