}
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (gc != NULL && gc->driContext) {
__GLXscreenConfigs *psc;
return psc->driScreen->getSwapInterval(pdraw);
}
}
+#endif
return 0;
}
int ret;
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
if (!gc)
return GLX_BAD_CONTEXT;
#endif
psc = GetGLXScreenConfigs(gc->currentDpy, gc->screen);
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
+#endif
/* FIXME: Looking at the GLX_SGI_video_sync spec in the extension registry,
* FIXME: there should be a GLX encoding for this call. I can find no
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, &ust, &msc, &sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
+#endif
return GLX_BAD_CONTEXT;
}
{
GLXContext gc = __glXGetCurrentContext();
__GLXscreenConfigs *psc;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
int64_t ust, msc, sbc;
int ret;
#endif
psc = GetGLXScreenConfigs( gc->currentDpy, gc->screen);
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(gc->currentDpy, gc->currentDrawable, NULL);
+#endif
#ifdef __DRI_MEDIA_STREAM_COUNTER
if (psc->msc != NULL && psc->driScreen ) {
return (ret == 0) ? 0 : GLX_BAD_CONTEXT;
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, 0, divisor, remainder, &ust, &msc,
&sbc);
*count = (unsigned) msc;
return (ret == True) ? 0 : GLX_BAD_CONTEXT;
}
+#endif
return GLX_BAD_CONTEXT;
}
{
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
int i, ret;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw;
+#endif
__GLXscreenConfigs *psc;
if (!priv)
return False;
+#ifdef GLX_DIRECT_RENDERING
pdraw = GetGLXDRIDrawable(dpy, drawable, &i);
+#endif
psc = &priv->screenConfigs[i];
#if defined(__DRI_SWAP_BUFFER_COUNTER) && defined(__DRI_MEDIA_STREAM_COUNTER)
&& ((*psc->sbc->getSBC)(pdraw->driDrawable, sbc) == 0)
&& (__glXGetUST(ust) == 0) );
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc && psc->driScreen && psc->driScreen->getDrawableMSC) {
ret = psc->driScreen->getDrawableMSC(psc, pdraw, ust, msc, sbc);
return ret;
}
+#endif
return False;
}
{
GLXContext gc = __glXGetCurrentContext();
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
- if (!pdraw || !gc) /* no GLX for this */
+ if (!gc) /* no GLX for this */
return -1;
#ifdef GLX_DIRECT_RENDERING
- if (!gc->driContext)
+ if (!pdraw || !gc->driContext)
return -1;
#endif
int64_t * msc, int64_t * sbc)
{
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen );
int ret;
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForMSC) {
ret = psc->driScreen->waitForMSC(pdraw, target_msc, divisor, remainder,
ust, msc, sbc);
return ret;
}
+#endif
return False;
}
int64_t * msc, int64_t * sbc)
{
int screen;
+#ifdef GLX_DIRECT_RENDERING
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen);
+#endif
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
int ret;
return ((ret == 0) && (__glXGetUST(ust) == 0));
}
#endif
+
+#ifdef GLX_DIRECT_RENDERING
if (pdraw && psc->driScreen && psc->driScreen->waitForSBC) {
ret = psc->driScreen->waitForSBC(pdraw, target_sbc, ust, msc, sbc);
return ret;
}
+#endif
+
return False;
}