diff options
author | Andrew Knight <andrew.knight@theqtcompany.com> | 2014-11-14 10:52:01 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-14 19:01:38 +0100 |
commit | c6df5fe3ed0f2a722931be098914978cf17a666f (patch) | |
tree | 23abe340dbc427a3afd255c79316f79fef937059 /src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp | |
parent | 32db2f425a0b85bc03d7de42d7b44337d0aa16f4 (diff) |
ANGLE: Upgrade to version 1.2.30d6c255d238
The following patches have been changed:
0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch
Removed because it is no longer possible to build ANGLE with MSVC2008
0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch
Removed because the minimum version of MinGW moved to 4.8.2
0005-Fix-build-when-SSE2-is-not-available.patch
Removed because it was fixed upstream
0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
Removed because older versions of MinGW are not supported
0007-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch
Removed because it was fixed upstream
Task-number: QTBUG-41903
Change-Id: I976d30802f7f6fee725cf9a9f1325d5e82609835
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp | 79 |
1 files changed, 45 insertions, 34 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp b/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp index 59d2835f7b..f67a03aa93 100644 --- a/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp +++ b/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp @@ -13,10 +13,10 @@ static TBehavior getBehavior(const std::string& str) { - static const std::string kRequire("require"); - static const std::string kEnable("enable"); - static const std::string kDisable("disable"); - static const std::string kWarn("warn"); + const char kRequire[] = "require"; + const char kEnable[] = "enable"; + const char kDisable[] = "disable"; + const char kWarn[] = "warn"; if (str == kRequire) return EBhRequire; else if (str == kEnable) return EBhEnable; @@ -46,50 +46,61 @@ void TDirectiveHandler::handleError(const pp::SourceLocation& loc, void TDirectiveHandler::handlePragma(const pp::SourceLocation& loc, const std::string& name, - const std::string& value) + const std::string& value, + bool stdgl) { - static const std::string kSTDGL("STDGL"); - static const std::string kOptimize("optimize"); - static const std::string kDebug("debug"); - static const std::string kOn("on"); - static const std::string kOff("off"); - - bool invalidValue = false; - if (name == kSTDGL) + if (stdgl) { + const char kInvariant[] = "invariant"; + const char kAll[] = "all"; + + if (name == kInvariant && value == kAll) + mPragma.stdgl.invariantAll = true; // The STDGL pragma is used to reserve pragmas for use by future - // revisions of GLSL. Ignore it. + // revisions of GLSL. Do not generate an error on unexpected + // name and value. return; } - else if (name == kOptimize) - { - if (value == kOn) mPragma.optimize = true; - else if (value == kOff) mPragma.optimize = false; - else invalidValue = true; - } - else if (name == kDebug) - { - if (value == kOn) mPragma.debug = true; - else if (value == kOff) mPragma.debug = false; - else invalidValue = true; - } else { - mDiagnostics.report(pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, loc, name); - return; - } + const char kOptimize[] = "optimize"; + const char kDebug[] = "debug"; + const char kOn[] = "on"; + const char kOff[] = "off"; - if (invalidValue) - mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, - "invalid pragma value", value, - "'on' or 'off' expected"); + bool invalidValue = false; + if (name == kOptimize) + { + if (value == kOn) mPragma.optimize = true; + else if (value == kOff) mPragma.optimize = false; + else invalidValue = true; + } + else if (name == kDebug) + { + if (value == kOn) mPragma.debug = true; + else if (value == kOff) mPragma.debug = false; + else invalidValue = true; + } + else + { + mDiagnostics.report(pp::Diagnostics::PP_UNRECOGNIZED_PRAGMA, loc, name); + return; + } + + if (invalidValue) + { + mDiagnostics.writeInfo(pp::Diagnostics::PP_ERROR, loc, + "invalid pragma value", value, + "'on' or 'off' expected"); + } + } } void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc, const std::string& name, const std::string& behavior) { - static const std::string kExtAll("all"); + const char kExtAll[] = "all"; TBehavior behaviorVal = getBehavior(behavior); if (behaviorVal == EBhUndefined) |