Removes getDisplay and getContext calls

TRAC #22000

Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1408 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index b3e1521..ed44c36 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -1318,8 +1318,8 @@
     }
 
     // Write the HLSL input/output declarations
+    const bool sm3 = mRenderer->getShaderModel3Support();
     Context *context = getContext();
-    const bool sm3 = context->supportsShaderModel3();
     const int maxVaryingVectors = context->getMaximumVaryingVectors();
 
     if (registers == maxVaryingVectors && fragmentShader->mUsesFragCoord)
@@ -1931,9 +1931,8 @@
         return false;
     }
 
-    Context *context = getContext();
-    const char *vertexProfile = context->supportsShaderModel3() ? "vs_3_0" : "vs_2_0";
-    const char *pixelProfile = context->supportsShaderModel3() ? "ps_3_0" : "ps_2_0";
+    const char *vertexProfile = mRenderer->getShaderModel3Support() ? "vs_3_0" : "vs_2_0";
+    const char *pixelProfile = mRenderer->getShaderModel3Support() ? "ps_3_0" : "ps_2_0";
 
     ID3D10Blob *vertexBinary = compileToBinary(infoLog, vertexHLSL.c_str(), vertexProfile, &mConstantTableVS);
     ID3D10Blob *pixelBinary = compileToBinary(infoLog, pixelHLSL.c_str(), pixelProfile, &mConstantTablePS);
@@ -1983,6 +1982,7 @@
         mDxFrontCCWLocation = getUniformLocation("dx_FrontCCW");
         mDxPointsOrLinesLocation = getUniformLocation("dx_PointsOrLines");
 
+        Context *context = getContext();
         context->markDxUniformsDirty();
 
         return true;