On Die, 2011-08-16 at 16:55 +0800, Cooper Yuan wrote: > We still call flush method of DRI2_Flush extension in other functions > of egl_dri2 driver. for example, dri2_copy_buffers(), because we > expect all the rendering to this drawable have been flushed before > copying the buffers. > > > The code I added eventually invokes st->pipe->flush(), so I think it > handles correctly, any concern?
The more I look at the patch, the more I'm convinced it's wrong. At least with GLX, there's no requirement for the drawable to have any current context at SwapBuffers time. AFAICT this code will crash with a null pointer dereference in that case. I really suspect the problem you were trying to address with this needs to be addressed in EGL code. BTW, to get the same semantics as glFinish, the flush would need to be called with a non-NULL last argument and the returned fence waited for. -- 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