mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
glx: Don't do the implicit glFlush in SwapBuffers if it's the wrong drawable.
The GLX Spec says you only implicitly glFlush if the drawable being swapped is the current context's drawable.
This commit is contained in:
parent
49d7e48b33
commit
4d01bea808
1 changed files with 6 additions and 2 deletions
|
|
@ -727,11 +727,16 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
|||
xGLXSwapBuffersReq *req;
|
||||
#endif
|
||||
|
||||
gc = __glXGetCurrentContext();
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
|
||||
|
||||
if (pdraw != NULL) {
|
||||
glFlush();
|
||||
if (gc && drawable == gc->currentDrawable) {
|
||||
glFlush();
|
||||
}
|
||||
|
||||
(*pdraw->psc->driScreen->swapBuffers)(pdraw, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
|
@ -746,7 +751,6 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
|
|||
** The calling thread may or may not have a current context. If it
|
||||
** does, send the context tag so the server can do a flush.
|
||||
*/
|
||||
gc = __glXGetCurrentContext();
|
||||
if ((gc != NULL) && (dpy == gc->currentDpy) &&
|
||||
((drawable == gc->currentDrawable)
|
||||
|| (drawable == gc->currentReadable))) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue