Mesa (master): GLX/OML: honor OML semantics even if target, divisor and remainder are 0
Jesse Barnes
jbarnes at kemper.freedesktop.org
Mon Mar 22 16:41:23 PDT 2010
Module: Mesa
Branch: master
Commit: 8f4f2a0c3625de2bb2b8e955afc23b3ce8c95f93
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f4f2a0c3625de2bb2b8e955afc23b3ce8c95f93
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Mon Mar 22 16:39:11 2010 -0700
GLX/OML: honor OML semantics even if target, divisor and remainder are 0
This change passes a remainder of 1 to the server with the
DRI2SwapBuffers request, causing it to honor the OML semantics for the
swap rather than falling through to glXSwapBuffers behavior. The
remainder actually ends up ignored since the divisor is 0, but we need
to differentiate the OML and standard behavior somehow.
Reported-by: Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
src/glx/glxcmds.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 49cbce7..ea267f3 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -2507,6 +2507,9 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
if (divisor > 0 && remainder >= divisor)
return -1;
+ if (target_msc == 0 && divisor == 0 && remainder == 0)
+ remainder = 1;
+
#ifdef __DRI_SWAP_BUFFER_COUNTER
if (psc->counters != NULL)
return (*psc->sbc->swapBuffersMSC)(pdraw->driDrawable, target_msc,
More information about the mesa-commit
mailing list