Move Sharehandle support query to renderer
Trac #21727
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1330 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libEGL/Display.cpp b/src/libEGL/Display.cpp
index c08135e..9f2ea70 100644
--- a/src/libEGL/Display.cpp
+++ b/src/libEGL/Display.cpp
@@ -669,6 +669,7 @@
void Display::initExtensionString()
{
HMODULE swiftShader = GetModuleHandle(TEXT("swiftshader_d3d9.dll"));
+ bool shareHandleSupported = mRenderer->getShareHandleSupport();
mExtensionString = "";
@@ -676,7 +677,7 @@
mExtensionString += "EGL_EXT_create_context_robustness ";
// ANGLE-specific extensions
- if (shareHandleSupported())
+ if (shareHandleSupported)
{
mExtensionString += "EGL_ANGLE_d3d_share_handle_client_buffer ";
}
@@ -688,7 +689,7 @@
mExtensionString += "EGL_ANGLE_software_display ";
}
- if (shareHandleSupported())
+ if (shareHandleSupported)
{
mExtensionString += "EGL_ANGLE_surface_d3d_texture_2d_share_handle ";
}
@@ -707,13 +708,6 @@
return mExtensionString.c_str();
}
-bool Display::shareHandleSupported() const
-{
- // PIX doesn't seem to support using share handles, so disable them.
- // D3D9_REPLACE
- return mRenderer->isD3d9ExDevice() && !gl::perfActive();
-}
-
IDirect3DVertexShader9 *Display::createVertexShader(const DWORD *function, size_t length)
{
return mVertexShaderCache.create(function, length);