From d94af01c90575348c4e81a418257f254b6f8d225 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 27 Jun 2019 11:18:24 +0200 Subject: BASELINE: Update Chromium to 75.0.3770.116 Change-Id: Ifcd5227841577e8ce81a1b7a54c56caba4d85e02 Reviewed-by: Michal Klocek --- .../angle/src/compiler/preprocessor/DiagnosticsBase.cpp | 4 +++- .../angle/src/compiler/preprocessor/DiagnosticsBase.h | 1 + .../angle/src/compiler/preprocessor/DirectiveParser.cpp | 12 ++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'chromium/third_party/angle/src') diff --git a/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.cpp b/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.cpp index 575b151432d..c4832c66d3a 100644 --- a/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.cpp +++ b/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.cpp @@ -115,6 +115,8 @@ const char *Diagnostics::message(ID id) return "invalid file number"; case PP_INVALID_LINE_DIRECTIVE: return "invalid line directive"; + case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1: + return "extension directive must occur before any non-preprocessor tokens in ESSL1"; case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL3: return "extension directive must occur before any non-preprocessor tokens in ESSL3"; case PP_UNDEFINED_SHIFT: @@ -129,7 +131,7 @@ const char *Diagnostics::message(ID id) return "unexpected token after conditional expression"; case PP_UNRECOGNIZED_PRAGMA: return "unrecognized pragma"; - case PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1: + case PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL: return "extension directive should occur before any non-preprocessor tokens"; case PP_WARNING_MACRO_NAME_RESERVED: return "macro name with a double underscore is reserved - unintented behavior is " diff --git a/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.h b/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.h index bb90bf08292..6be5c72ddec 100644 --- a/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.h +++ b/chromium/third_party/angle/src/compiler/preprocessor/DiagnosticsBase.h @@ -73,6 +73,7 @@ class Diagnostics PP_WARNING_BEGIN, PP_EOF_IN_DIRECTIVE, PP_UNRECOGNIZED_PRAGMA, + PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL, PP_WARNING_MACRO_NAME_RESERVED, PP_WARNING_END }; diff --git a/chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.cpp b/chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.cpp index e99d843b2d3..b7f8d91ecf5 100644 --- a/chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.cpp +++ b/chromium/third_party/angle/src/compiler/preprocessor/DirectiveParser.cpp @@ -676,8 +676,16 @@ void DirectiveParser::parseExtension(Token *token) } else { - mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1, - token->location, token->text); + if (mSettings.shaderSpec == SH_WEBGL_SPEC) + { + mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_WEBGL, + token->location, token->text); + } + else + { + mDiagnostics->report(Diagnostics::PP_NON_PP_TOKEN_BEFORE_EXTENSION_ESSL1, + token->location, token->text); + } } } if (valid) -- cgit v1.2.1