summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Barnes <[email protected]>2010-01-13 19:01:51 -0500
committerJesse Barnes <[email protected]>2010-01-13 19:01:51 -0500
commit1cfd769c2ec0b605cacd75c0e9c89346e1f9518d (patch)
treec61e5f243cbcee82ec332f4ff28217a77debaf17 /src
parent62eb28c810a192dab772402904c50eea43b8340e (diff)
DRI2: don't send DRI2 requests the server doesn't know about
At init time, NULL out the hooks that send the server new requests. DRI2 never supported these extensions, so this preserves old behavior on old servers with new Mesa.
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/dri2_glx.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index e1688f38fff..7b0c52b50d4 100644
--- a/src/glx/x11/dri2_glx.c
+++ b/src/glx/x11/dri2_glx.c
@@ -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.*/