Skip to content

glx/dri: Fix refcounting for naked Windows

Adam Jackson requested to merge ajax/mesa:zink-glx-mwsc-fix into main

"Naked" here refers to the GLX 1.2 convention where you could pass a bare Window to glXMakeCurrent and expect things to work. Since those didn't have an explicit creation API, we were under-refcounting them, so if you moved a context from one window to another the old window's buffers might get reaped.


Pretty sure this leaks, but frankly persisting the state is more correct anyway, and if the window actually were to die the app probably would follow shortly thereafter so it's not really keeping me up at night. But for apps that (for example) import a stream of pbuffers from another app, that might not be good enough. The fix there is to better differentiate between the different kinds of autovivified drawables, I think.

Merge request reports