Bug 1245747 - Handle ANGLE device reset failure - r=jgilbert
authorEdwin Flores <edwin@mozilla.com>
Thu, 28 Jul 2016 11:45:27 +0100
changeset 349128 fb6cb6888ca006635f5d6b2369eb52c86a9059c6
parent 349127 4f78b9f4278fab7f3fc606f974c104a2721ba769
child 349129 d757a1ca6d56b381805bc9a85590ef6462cda312
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1245747
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1245747 - Handle ANGLE device reset failure - r=jgilbert
gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
--- a/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -2599,16 +2599,22 @@ void Renderer11::releaseDeviceResources(
     SafeRelease(mSyncQuery);
 }
 
 // set notify to true to broadcast a message to all contexts of the device loss
 bool Renderer11::testDeviceLost()
 {
     bool isLost = false;
 
+    if (!mDevice) {
+        // We should only get here if resetDevice failed.
+        ASSERT(mDeviceLost);
+        return true;
+    }
+
     // GetRemovedReason is used to test if the device is removed
     HRESULT result = mDevice->GetDeviceRemovedReason();
     isLost = d3d11::isDeviceLostError(result);
 
     if (isLost)
     {
         // Log error if this is a new device lost event
         if (mDeviceLost == false)