Closed
Bug 764578
Opened 12 years ago
Closed 12 years ago
WebGL context creation keeps failing after D3D device has been lost
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
Attachments
(1 file, 1 obsolete file)
1.27 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
STR at least on WinXP: - go to a webgl page - do something that causes the D3D device to get lost. In WinXP, it's enough to lock the screen (Win+L). - reload the webgl page Expected: the webgl page should work normally after reloading Actual: upon reloading, webgl context creation fails. the problem is that in gfx/angle/src/libEGL/Display.cpp, in Display::createOffscreenSurface, at line 682, we have: if (testDeviceLost()) { if (!restoreLostDevice()) return EGL_NO_SURFACE; } and in the circumstances reproducing this bug, testDeviceLost() return true here so we bail out with EGL_NO_SURFACE here. Need a D3D expert to see if there is anything to do here... Note: this is a follow-up from bug 760415
Assignee | ||
Comment 1•12 years ago
|
||
So, the above code snippet tries to restore the device, and here's where this is failing: bool Display::restoreLostDevice() { for (ContextSet::iterator ctx = mContextSet.begin(); ctx != mContextSet.end(); ctx++) { if ((*ctx)->isResetNotificationEnabled()) return false; // If reset notifications have been requested, application must delete all contexts first } Here, isResetNotificationEnabled returns true as we asked to get context loss on reset (EXT_robustness). Anyway, the question is what is this other GL context that is still around here? And the answer is probably the global context --- which we don't make use of on Windows. Let's try disabling it.
Assignee | ||
Comment 2•12 years ago
|
||
So, this makes it work for me on this WinXP box. So the GL context that was lying around and preventing resetting the device was indeed the global context. We don't use the global context on Windows EGL at all, do we? I mean, it should have nothing to do with the D3D share handles, right? This should make the WebGL success rates go up significantly on Windows, as people do keep long-running sessions and if any device loss occurred, without this patch, they couldn't get WebGL anymore until they quit and restarted Firefox. So I would like to backport this to aurora/beta. This patch also adds some comment around the recently added equivalent line for Android.
Attachment #632939 -
Flags: review?(jgilbert)
Assignee | ||
Comment 3•12 years ago
|
||
Note: the only WinXP specific thing here should be that Win+L loses the device. Similar symptoms should be observable on Win7 when device loss happens.
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #632939 -
Attachment is obsolete: true
Attachment #632939 -
Flags: review?(jgilbert)
Attachment #632950 -
Flags: review?(jgilbert)
Updated•12 years ago
|
Attachment #632950 -
Flags: review?(jgilbert) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=06db9c45a0bf
Assignee | ||
Comment 6•12 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/2af41a172a6c
Assignee: nobody → bjacob
Target Milestone: --- → mozilla16
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2af41a172a6c
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•