Fix NVIDIA device reset handling and recovery
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Crash Data
Attachments
(1 file)
There are too many buffers to clear and WR is becoming unstable the more I attempt to clear. I don't think it is worth the effort to avoid a full reset just for NVIDIA binary driver resets. Let's just handle it like a normal reset.
While testing this via suspend and resume, I often found that we would lose WebRender entirely and fallback to basic. This is because of this:
We would call fGetError
, it would return GL_CONTEXT_LOST
, set mContextLost = false
in the process, and the next fGetError
call would continue to return GL_CONTEXT_LOST
as a result. We should probably be calling mSymbols.fGetError directly for the initial call as that seems more in line with the spirit of the intention here.
Assignee | ||
Comment 1•4 years ago
|
||
These NVIDIA device resets are specific to Linux and trying to handle
them more gracefully is increasingly difficult. There are many
textures/buffers that we need to clear inside WebRender, but attempting
to add them to the list has proved difficult due to the number of places
we need to add, as well as race conditions with clearing them. Given
this shouldn't happen often, it doesn't seem worth optimizing for and we
should treat it just as an innocent device reset.
Testing this revealed an issue during recovery where unflushed device
resets were not handled as expected. When we checked for errors after
creating a new GL context, we would encounter a GL_CONTEXT_LOST error
which we failed to recover from. This is because we called
GLContext::fGetError instead of the GL method directly; the context lost
state was saved in mContextLost, and any subsequent calls to
GLContext::fGetError would continue to return GL_CONTEXT_LOST.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•