summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11/dri2.c')
-rw-r--r--src/glx/x11/dri2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glx/x11/dri2.c b/src/glx/x11/dri2.c
index 922edbdcf52..9ce633c40d4 100644
--- a/src/glx/x11/dri2.c
+++ b/src/glx/x11/dri2.c
@@ -537,4 +537,21 @@ Bool DRI2WaitSBC(Display *dpy, XID drawable, CARD64 target_sbc, CARD64 *ust,
return True;
}
+void DRI2SwapInterval(Display *dpy, XID drawable, int interval)
+{
+ XExtDisplayInfo *info = DRI2FindDisplay(dpy);
+ xDRI2SwapIntervalReq *req;
+
+ XextSimpleCheckExtension (dpy, info, dri2ExtensionName);
+
+ LockDisplay(dpy);
+ GetReq(DRI2SwapInterval, req);
+ req->reqType = info->codes->major_opcode;
+ req->dri2ReqType = X_DRI2SwapInterval;
+ req->drawable = drawable;
+ req->interval = interval;
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
#endif /* GLX_DIRECT_RENDERING */