diff options
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r-- | src/glx/glxcmds.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 704e9a0b9d7..49cbce72f8a 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -2364,7 +2364,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable, psc = &priv->screenConfigs[i]; #if defined(__DRI_SWAP_BUFFER_COUNTER) && defined(__DRI_MEDIA_STREAM_COUNTER) - if (pdraw && psc->sbc && psc->sbc) + if (pdraw && psc->sbc && psc->msc) return ( (pdraw && psc->sbc && psc->msc) && ((*psc->msc->getMSC)(psc->driScreen, msc) == 0) && ((*psc->sbc->getSBC)(pdraw->driDrawable, sbc) == 0) @@ -2494,7 +2494,7 @@ __glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable, __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, &screen); __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); - if (!pdraw || !gc->driContext) /* no GLX for this */ + if (!pdraw || !gc || !gc->driContext) /* no GLX for this */ return -1; /* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE @@ -2534,8 +2534,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable, __GLXscreenConfigs * const psc = GetGLXScreenConfigs( dpy, screen ); int ret; - fprintf(stderr, "waitmsc: %lld, %lld, %lld\n", target_msc, divisor, - remainder); /* The OML_sync_control spec says these should "generate a GLX_BAD_VALUE * error", but the return type in the spec is Bool. @@ -2547,7 +2545,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable, #ifdef __DRI_MEDIA_STREAM_COUNTER if (pdraw != NULL && psc->msc != NULL) { - fprintf(stderr, "dri1 msc\n"); ret = (*psc->msc->waitForMSC) (pdraw->driDrawable, target_msc, divisor, remainder, msc, sbc); @@ -2563,7 +2560,6 @@ __glXWaitForMscOML(Display * dpy, GLXDrawable drawable, return ret; } - fprintf(stderr, "no drawable??\n"); return False; } @@ -2594,7 +2590,7 @@ __glXWaitForSbcOML(Display * dpy, GLXDrawable drawable, return ((ret == 0) && (__glXGetUST(ust) == 0)); } #endif - if (pdraw && psc->driScreen && psc->driScreen->waitForMSC) { + if (pdraw && psc->driScreen && psc->driScreen->waitForSBC) { ret = psc->driScreen->waitForSBC(pdraw, target_sbc, ust, msc, sbc); return ret; } |