Add the ability to recover from a removed device (TDR or driver removal) to the D3D11 code path.
TRAC #22411
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Jamie Madill
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1857 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 7fec8d5..be2a92a 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -2092,7 +2092,7 @@
GLenum Context::getResetStatus()
{
- if (mResetStatus == GL_NO_ERROR)
+ if (mResetStatus == GL_NO_ERROR && !mContextLost)
{
// mResetStatus will be set by the markContextLost callback
// in the case a notification is sent
@@ -2103,6 +2103,8 @@
if (mResetStatus != GL_NO_ERROR)
{
+ ASSERT(mContextLost);
+
if (mRenderer->testDeviceResettable())
{
mResetStatus = GL_NO_ERROR;