summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp b/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp
index 662c8ae624..59d2835f7b 100644
--- a/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp
+++ b/src/3rdparty/angle/src/compiler/translator/DirectiveHandler.cpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -26,9 +26,11 @@ static TBehavior getBehavior(const std::string& str)
}
TDirectiveHandler::TDirectiveHandler(TExtensionBehavior& extBehavior,
- TDiagnostics& diagnostics)
+ TDiagnostics& diagnostics,
+ int& shaderVersion)
: mExtensionBehavior(extBehavior),
- mDiagnostics(diagnostics)
+ mDiagnostics(diagnostics),
+ mShaderVersion(shaderVersion)
{
}
@@ -148,9 +150,12 @@ void TDirectiveHandler::handleExtension(const pp::SourceLocation& loc,
void TDirectiveHandler::handleVersion(const pp::SourceLocation& loc,
int version)
{
- static const int kVersion = 100;
-
- if (version != kVersion)
+ if (version == 100 ||
+ version == 300)
+ {
+ mShaderVersion = version;
+ }
+ else
{
std::stringstream stream;
stream << version;