Make testDeviceLoss able to perform the notifications
Trac #21727
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1332 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index b1ba5a6..4d88879 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -421,6 +421,7 @@
mDxUniformsDirty = true;
}
+// NOTE: this function should not assume that this context is current!
void Context::markContextLost()
{
if (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT)
@@ -3431,12 +3432,9 @@
{
if (mResetStatus == GL_NO_ERROR)
{
- bool lost = mRenderer->testDeviceLost();
-
- if (lost)
- {
- mDisplay->notifyDeviceLost(); // Sets mResetStatus
- }
+ // mResetStatus will be set by the markContextLost callback
+ // in the case a notification is sent
+ mRenderer->testDeviceLost(true);
}
GLenum status = mResetStatus;