Skip to content

egl: Simplify error handling in (the backend bit of) eglMakeCurrent

Adam Jackson requested to merge ajax/mesa:egl-makecurrent-tryhard into main

This code was trying too hard. If binding the context fails then the thread state is undefined, so there's no need to try to restore the previous state (as the previous code did) and it's not guaranteed to work even if you try. Instead just unbind everything.


In addition to being cleaner more obvious, this effectively matches what GLX has always done. It's sort of tricky to test, though.

Merge request reports