diff options
Diffstat (limited to 'src/glx/x11/dri2_glx.c')
-rw-r--r-- | src/glx/x11/dri2_glx.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index 83149062f3..7b0c52b50d 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -205,14 +205,14 @@ static int dri2DrawableGetMSC(__GLXscreenConfigs *psc, __GLXDRIdrawable *pdraw, int64_t *ust, int64_t *msc, int64_t *sbc) { - return DRI2GetMSC(psc->dpy, pdraw->drawable, ust, msc, sbc); + return DRI2GetMSC(psc->dpy, pdraw->xDrawable, ust, msc, sbc); } static int dri2WaitForMSC(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc) { - return DRI2WaitMSC(pdraw->psc->dpy, pdraw->drawable, target_msc, divisor, + return DRI2WaitMSC(pdraw->psc->dpy, pdraw->xDrawable, target_msc, divisor, remainder, ust, msc, sbc); } @@ -220,7 +220,7 @@ static int dri2WaitForSBC(__GLXDRIdrawable *pdraw, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc) { - return DRI2WaitSBC(pdraw->psc->dpy, pdraw->drawable, target_sbc, ust, msc, + return DRI2WaitSBC(pdraw->psc->dpy, pdraw->xDrawable, target_sbc, ust, msc, sbc); } @@ -381,7 +381,7 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor, return 0; } - DRI2SwapBuffers(pdraw->psc->dpy, pdraw->drawable, target_msc, divisor, + DRI2SwapBuffers(pdraw->psc->dpy, pdraw->xDrawable, target_msc, divisor, remainder, &ret); #if __DRI2_FLUSH_VERSION >= 2 @@ -575,11 +575,19 @@ dri2CreateScreen(__GLXscreenConfigs * psc, int screen, psp->swapBuffers = dri2SwapBuffers; psp->waitGL = dri2WaitGL; psp->waitX = dri2WaitX; - psp->getDrawableMSC = dri2DrawableGetMSC; - psp->waitForMSC = dri2WaitForMSC; - psp->waitForSBC = dri2WaitForSBC; - psp->setSwapInterval = dri2SetSwapInterval; - psp->getSwapInterval = dri2GetSwapInterval; + if (pdp->driMinor >= 2) { + psp->getDrawableMSC = dri2DrawableGetMSC; + psp->waitForMSC = dri2WaitForMSC; + psp->waitForSBC = dri2WaitForSBC; + psp->setSwapInterval = dri2SetSwapInterval; + psp->getSwapInterval = dri2GetSwapInterval; + } else { + psp->getDrawableMSC = NULL; + psp->waitForMSC = NULL; + psp->waitForSBC = NULL; + psp->setSwapInterval = NULL; + psp->getSwapInterval = NULL; + } /* DRI2 suports SubBuffer through DRI2CopyRegion, so it's always * available.*/ |