Closed Bug 1107718 Opened 10 years ago Closed 10 years ago

Device resets or other forms of removal can cause a variety of crashes

Categories

(Core :: Graphics: Layers, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Deal properly with a D3D11 device reset (obsolete) (deleted) — Splinter Review
Currently when our D3D11 device is reinitialized because of hardware updates or removal, we crash. We shouldn't.
Attachment #8532262 - Flags: review?(nical.bugzilla)
Comment on attachment 8532262 [details] [diff] [review] Deal properly with a D3D11 device reset Review of attachment 8532262 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/d3d11/CompositorD3D11.cpp @@ +952,5 @@ > 0); > HandleError(hr); > } > + > + if (FAILED(hr)) { please replace this FAILED(hr) by Failed(hr) and remove the two HandleError above. Also you could just do return Succeeded(hr); ::: gfx/thebes/gfxWindowsPlatform.cpp @@ +385,5 @@ > */ > + if (DidRenderingDeviceReset()) { > + mD3D11DeviceInitialized = false; > + mD3D11Device = nullptr; > + mD3D11ContentDevice = nullptr; Shouldn't you null out the dxgi adapter too? (I had to do it in my own version of the device reset patch.
Attachment #8532262 - Flags: review?(nical.bugzilla) → review+
Blocks: 1068320
This seems to work properly now for all reset scenarios I've tried. I'm sure I've missed something though :-).
Attachment #8532262 - Attachment is obsolete: true
Attachment #8539894 - Flags: review?(nical.bugzilla)
Comment on attachment 8539894 [details] [diff] [review] Deal properly with a D3D11 device reset v2 Review of attachment 8539894 [details] [diff] [review]: ----------------------------------------------------------------- r+ with the assertion below back in place. ::: gfx/layers/d3d11/CompositorD3D11.cpp @@ +1221,5 @@ > return; > } > // XXX - It would be nice to use gfxCriticalError, but it needs to > // be made to work off the main thread first. > + //MOZ_ASSERT(aSeverity != DebugAssert); Please uncomment this line.
Attachment #8539894 - Flags: review?(nical.bugzilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Depends on: 1120331
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: