Commit b1eee7af by Jamie Madill

D3D11: Only use share handles with HW driver.

WARP does not support surface sharing like native D3D11. This, combined with a Chromium-side change, should fix WARP rendering in Chrome. BUG=angleproject:973 BUG=429792 Change-Id: I41e778625e8697e45657843f2f337bcffe7ddbe2 Reviewed-on: https://chromium-review.googlesource.com/265611Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 31906ecf
...@@ -2323,9 +2323,30 @@ bool Renderer11::getShareHandleSupport() const ...@@ -2323,9 +2323,30 @@ bool Renderer11::getShareHandleSupport() const
{ {
// We only currently support share handles with BGRA surfaces, because // We only currently support share handles with BGRA surfaces, because
// chrome needs BGRA. Once chrome fixes this, we should always support them. // chrome needs BGRA. Once chrome fixes this, we should always support them.
if (!getRendererExtensions().textureFormatBGRA8888)
{
return false;
}
// PIX doesn't seem to support using share handles, so disable them. // PIX doesn't seem to support using share handles, so disable them.
if (gl::DebugAnnotationsActive())
{
return false;
}
// Also disable share handles on Feature Level 9_3, since it doesn't support share handles on RGBA8 textures/swapchains. // Also disable share handles on Feature Level 9_3, since it doesn't support share handles on RGBA8 textures/swapchains.
return getRendererExtensions().textureFormatBGRA8888 && !gl::DebugAnnotationsActive() && !(mFeatureLevel <= D3D_FEATURE_LEVEL_9_3); if (mFeatureLevel <= D3D_FEATURE_LEVEL_9_3)
{
return false;
}
// Also disable on non-hardware drivers, since sharing doesn't work cross-driver.
if (mDriverType != D3D_DRIVER_TYPE_HARDWARE)
{
return false;
}
return true;
} }
bool Renderer11::getPostSubBufferSupport() const bool Renderer11::getPostSubBufferSupport() const
......
#include "ANGLETest.h" #include "ANGLETest.h"
// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against. // Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
ANGLE_TYPED_TEST_CASE(PbufferTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL); ANGLE_TYPED_TEST_CASE(PbufferTest, ES2_D3D9, ES2_D3D11, ES2_OPENGL, ES2_D3D11_WARP, ES2_D3D11_REFERENCE);
template<typename T> template<typename T>
class PbufferTest : public ANGLETest class PbufferTest : public ANGLETest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment