Eliminates redundant calls to GetDeviceCaps
TRAC #12283
Signed-off-by: Daniel Koch
Author: Shannon Woods
git-svn-id: https://angleproject.googlecode.com/svn/trunk@339 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index ac12d29..fb6a69e 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -222,9 +222,9 @@
if (!mHasBeenCurrent)
{
- device->GetDeviceCaps(&mDeviceCaps);
+ mDeviceCaps = display->getDeviceCaps();
- mBufferBackEnd = new Dx9BackEnd(device);
+ mBufferBackEnd = new Dx9BackEnd(this, device);
mVertexDataManager = new VertexDataManager(this, mBufferBackEnd);
mIndexDataManager = new IndexDataManager(this, mBufferBackEnd);
mBlit = new Blit(this);
@@ -268,11 +268,8 @@
{
depthStencil->Release();
}
-
- D3DCAPS9 capabilities;
- device->GetDeviceCaps(&capabilities);
- if (capabilities.PixelShaderVersion == D3DPS_VERSION(3, 0))
+ if (mDeviceCaps.PixelShaderVersion == D3DPS_VERSION(3, 0))
{
mPsProfile = "ps_3_0";
mVsProfile = "vs_3_0";