OSDN Git Service

DRI2: expose OML_sync_control if possible
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 5 Mar 2010 19:17:19 +0000 (11:17 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 5 Mar 2010 19:22:05 +0000 (11:22 -0800)
If the server supports the OML related protocol, enable support for the
extension.

src/glx/dri2_glx.c

index 29d589c..d573e46 100644 (file)
@@ -614,6 +614,9 @@ dri2CreateScreen(__GLXscreenConfigs * psc, int screen,
       psp->setSwapInterval = dri2SetSwapInterval;
       psp->getSwapInterval = dri2GetSwapInterval;
 #endif
+#if defined(X_DRI2GetMSC) && defined(X_DRI2WaitMSC) && defined(X_DRI2SwapInterval)
+      __glXEnableDirectExtension(psc, "GLX_OML_sync_control");
+#endif
    }
 
    /* DRI2 suports SubBuffer through DRI2CopyRegion, so it's always