On Don, 2012-11-15 at 04:43 +0100, Marek Olšák wrote: > > For the asynchronous SwapBuffers to work, there must be a separate X > connection, because Xlib isn't thread-safe at all. > > Now the bad news. The DRI invalidate events may be received too late. > We can't wait for the events in glXSwapBuffers, because that would > defeat the whole purpose of thread offloading.
Why would it? Couldn't you e.g. have the main thread wait for the SwapBuffers thread to get the events when it needs the buffer information for the next frame? > For normal apps, that only happens when the window is resized, so only > the next rendered frame is likely to contain garbage. DRI2SwapBuffers also generates invalidate events, and those can be crucial e.g. with page flipping. > Compositors don't work very well with this. I think it's because of > the invalidate events not being received in time. As a temporary > solution, I turn off asynchronous SwapBuffers if dri2_bind_tex_image > is called, which should cover all compositors that either directly or > indirectly use GLX. I fail to see the connection. Maybe the compositors break because they use page flipping, per above? -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev