Closed Bug 1086614 Opened 10 years ago Closed 10 years ago

Compositor D3D11 doesn't handle device loss

Categories

(Core :: Graphics: Layers, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1107718

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 4 obsolete files)

We know that this is not the cause for bug 1083071, but I want CompositorD3D11 to handle device loss before it becomes a problem.
Blocks: 1086611
Attached patch WIP untested patch (obsolete) — Splinter Review
Assignee: nobody → nical.bugzilla
Attachment #8508788 - Attachment is obsolete: true
Comment on attachment 8509553 [details] [diff] [review] WIP rebased on top of bug 1087270 Review of attachment 8509553 [details] [diff] [review]: ----------------------------------------------------------------- Bas, do you know if it is safe to call gfxPlatform::InitD3D11Devices a second time when the device is lost, and from the compositor thread (other than having to add a lock around GetDevice/InitDevice)?
Attachment #8509553 - Flags: feedback?(bas)
Comment on attachment 8509553 [details] [diff] [review] WIP rebased on top of bug 1087270 Review of attachment 8509553 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/d3d11/CompositorD3D11.cpp @@ +1112,5 @@ > +bool > +CompositorD3D11::VerifyDevice() > +{ > + gfxWindowsPlatform::GetPlatform()->VerifyD3D11Device(); > + if (mDevice != gfxWindowsPlatform::GetPlatform()->GetD3D11Device()) { Why not return !!mDevice if mDevice == gfxWindowsPlatform::GetPlatform()->GetD3D11Device()? @@ +1120,5 @@ > + if (!mDevice && !Initialize()) { > + // Initialize can return false without clearing mDevice > + mDevice = nullptr; > + return false; > + } Seems like you'd need to at least clear and recreate mSwapChain (and presumably some other stuff), in the device recreation case.
Blocks: 1089364
Attached patch handle removed devices (obsolete) — Splinter Review
Attachment #8509553 - Attachment is obsolete: true
Attachment #8509553 - Flags: feedback?(bas)
Attachment #8512014 - Flags: review?(bas)
I am running into d3d11CreateDevice failing with DXGI_ERROR_UNSUPPORTED when I try to recreate the device after it has been reset (testing this by reinstalling my drivers while gecko is running). It's unclear what to do when this happens (basically no way to render to the screen when this happens, since we can't fallback to another backend).
Updated patch, flagging for feedback rather than review since I haven't yet managed to recreate the device.
Attachment #8512014 - Attachment is obsolete: true
Attachment #8512014 - Flags: review?(bas)
Attachment #8530945 - Flags: feedback?(bas)
The problem was that I didn't re-create the DXGI adapter. With this patch I was able to reinstall my graphics driver while Gecko is running without issue.
Attachment #8530945 - Attachment is obsolete: true
Attachment #8530945 - Flags: feedback?(bas)
Attachment #8530947 - Flags: review?(bas)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Attachment #8530947 - Flags: review?(bas)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: