Accept shader version 300 on ES3 contexts.

TRAC #22712
Signed-off-by: Jamie Madill
Signed-off-by: Shannon Woods
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2121 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/DirectiveHandler.cpp b/src/compiler/DirectiveHandler.cpp
index d1f6ab3..85eac8c 100644
--- a/src/compiler/DirectiveHandler.cpp
+++ b/src/compiler/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.
 //
@@ -148,9 +148,12 @@
 void TDirectiveHandler::handleVersion(const pp::SourceLocation& loc,
                                       int version)
 {
-    static const int kVersion = 100;
-
-    if (version != kVersion)
+    if (version == 100 ||
+        version == 300)
+    {
+        mDiagnostics.setShaderVersion(version);
+    }
+    else
     {
         std::stringstream stream;
         stream << version;