Commit cc05a562 by apatrick@chromium.org

Fix failure to recover from device hang.

Sometimes IDirect3DDevice9Ex::CheckDeviceState returns S_PRESENT_MODE_CHANGED when the GPU has hung. It's not consistent, maybe one time out of two when I hang the GPU while running WebGL Aquarium. This unfortunately means that changes to display mode will cause ANGLE to report context lost. Other ideas appreciated. Review URL: https://codereview.appspot.com/7305093 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1829 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 216e289f
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 1828
#define BUILD_REVISION 1829
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -910,7 +910,9 @@ bool Display::testDeviceLost()
{
if (mDeviceEx)
{
return FAILED(mDeviceEx->CheckDeviceState(NULL));
// Sometimes CheckDeviceState returns S_PRESENT_MODE_CHANGED when the GPU has hung.
HRESULT result = mDeviceEx->CheckDeviceState(NULL);
return FAILED(result) || result == S_PRESENT_MODE_CHANGED;
}
else if (mDevice)
{
......
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