WayfireWM / wayfire

A modular and extensible wayland compositor
https://wayfire.org/
MIT License
2.42k stars 179 forks source link

Recover from OpenGL context loss #2480

Open DemiMarie opened 1 month ago

DemiMarie commented 1 month ago

OpenGL contexts can be lost for a variety of reasons, of which perhaps the most common is the GPU and its driver failing to limit the impact of faults to a single context. To prevent a buggy web page using WebGL from taking down the whole user session, it would be nice to use robust OpenGL contexts.

kode54 commented 1 month ago

https://github.com/WayfireWM/wayfire/issues/2458

It needs plumbing into every plugin that uses OpenGL, and even then, I never got it to work without crashing the whole compositor.

DemiMarie commented 1 month ago

2458

It needs plumbing into every plugin that uses OpenGL, and even then, I never got it to work without crashing the whole compositor.

See the last two comments — after a context loss, every pointer to an OpenGL resource should be cleared, at least for ones managed by wlroots.