Skip to content

egl/dri2: optimize dri2_make_current

Lucas Stach requested to merge lynxeye/mesa:egl-makecurrent into main

While looking at the render behaviour of a Qt5 application, I noticed that it was causing quite a few unnecessary context flushes, due to repeated calls to eglMakeCurrent with the same set of parameters from the render thread. From the Qt5 framework PoV this makes sense, as the render thread is going through different stages of the render loop where it might be possible that a different context is bound between those stages. For the common case where the context and surfaces don't change this is causing quite a bit of overhead due to excessive flushing.

Edited by Lucas Stach

Merge request reports