Module: Mesa
Branch: master
Commit: d0937759db09797836e290220236f61ab0f18259
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0937759db09797836e290220236f61ab0f18259

Author: Eric Anholt <e...@anholt.net>
Date:   Thu Oct  4 13:42:16 2012 -0700

glx: Allow glXSwapInterval(0) when vblank_mode=0.

There's no reason to say no in this case.

---

 src/glx/dri2_glx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 18542d1..07a3384 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -830,7 +830,9 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
 
    switch (vblank_mode) {
    case DRI_CONF_VBLANK_NEVER:
-      return GLX_BAD_VALUE;
+      if (interval != 0)
+         return GLX_BAD_VALUE;
+      break;
    case DRI_CONF_VBLANK_ALWAYS_SYNC:
       if (interval <= 0)
         return GLX_BAD_VALUE;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to