d3d device lost detection needs more work

RESOLVED FIXED

Status

()

Core
Graphics
--
major
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: vlad, Assigned: bas)

Tracking

unspecified
x86
Windows 7
Points:
---

Firefox Tracking Flags

(blocking2.0 beta7+)

Details

Attachments

(1 attachment)

I see consistent lockup of my browser window if a GPU reset occurs.  Win 7 64-bit, another app is doing the GPU reset, nvidia 260.61 drivers.


17:53 < vlad> Bas: so this hang, it is ThebesLayerD3D9::DrawRegion calling cairo_d2d_finish_device, which in turn does:
17:53 < vlad> while (!done) { if (FAILED(query->GetData(&done, sizeof(BOOL), 0)) break; }
17:53 < vlad> that is never failing, and is never setting done to true
17:54 < vlad> I am guessing we should be checking for device lost inside that loop

I think it has to be done inside the loop, because the async nature of things means that the reset might not happen until we're actually executing that loop.
blocking2.0: --- → ?
(Assignee)

Comment 1

7 years ago
That's bad, the function should 'fail' as soon as the device is lost, rather than return S_FALSE for not having the data! (and it seems to do that on my machine) But I guess that isn't very reliable then! D3D10 layers should take care of this but in the meanwhile we might want to insert a check for DeviceRemovedReason and break is that returns some form of device loss.
(Assignee)

Comment 2

7 years ago
Created attachment 478661 [details] [diff] [review]
Break out of loop when device is removed

This takes care of breaking out of the loop when a device is lost.
Assignee: nobody → bas.schouten
Status: NEW → ASSIGNED
Attachment #478661 - Flags: review?(vladimir)
Attachment #478661 - Flags: review?(vladimir) → review+
blocking2.0: ? → beta7+
(Assignee)

Comment 3

7 years ago
http://hg.mozilla.org/mozilla-central/rev/e6ae83018a7c
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.