Compiler - match pixel and vertex shader profiles
TRAC #11717
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@94 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 3e98ec1..282d874 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -251,6 +251,20 @@
     {
         depthStencil->Release();
     }
+
+    D3DCAPS9 capabilities;
+    device->GetDeviceCaps(&capabilities);
+    
+    if (capabilities.PixelShaderVersion == D3DPS_VERSION(3, 0))
+    {
+        mPsProfile = "ps_3_0";
+        mVsProfile = "vs_3_0";
+    }
+    else  // egl::Display guarantees support for at least 2.0
+    {
+        mPsProfile = "ps_2_0";
+        mVsProfile = "vs_2_0";
+    }
 }
 
 void Context::setClearColor(float red, float green, float blue, float alpha)
@@ -1642,6 +1656,16 @@
     return GL_NO_ERROR;
 }
 
+const char *Context::getPixelShaderProfile()
+{
+    return mPsProfile;
+}
+
+const char *Context::getVertexShaderProfile()
+{
+    return mVsProfile;
+}
+
 void Context::detachBuffer(GLuint buffer)
 {
     // [OpenGL ES 2.0.24] section 2.9 page 22: