Disable GL_OES_standard_derivatives when ps_2_x or later is not available.

BUG=392
Review URL: https://codereview.appspot.com/7027051


Author:    bsalomon@google.com

(manual merge from master by daniel@transgaming.com)

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1704 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index f85ec9a..db06fda 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -259,7 +259,7 @@
         mSupportsLuminanceAlphaTextures = mRenderer->getLuminanceAlphaTextureSupport();
         mSupportsDepthTextures = mRenderer->getDepthTextureSupport();
         mSupportsTextureFilterAnisotropy = mRenderer->getTextureFilterAnisotropySupport();
-
+        mSupportsDerivativeInstructions = mRenderer->getDerivativeInstructionSupport();
         mSupports32bitIndices = mRenderer->get32BitIndexSupport();
 
         mNumCompressedTextureFormats = 0;
@@ -2266,6 +2266,11 @@
     return mSupportsTextureFilterAnisotropy;
 }
 
+bool Context::supportsDerivativeInstructions() const
+{
+    return mSupportsDerivativeInstructions;
+}
+
 float Context::getTextureMaxAnisotropy() const
 {
     return mMaxTextureAnisotropy;
@@ -2504,7 +2509,10 @@
     mExtensionString += "GL_OES_packed_depth_stencil ";
     mExtensionString += "GL_OES_get_program_binary ";
     mExtensionString += "GL_OES_rgb8_rgba8 ";
-    mExtensionString += "GL_OES_standard_derivatives ";
+    if (supportsDerivativeInstructions())
+    {
+        mExtensionString += "GL_OES_standard_derivatives ";
+    }
 
     if (supportsFloat16Textures())
     {