summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 4610ec579f5..f9aaf47e7d1 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1273,9 +1273,9 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
}
static void
-dri2_x11_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
+dri2_x11_setup_swap_interval(_EGLDisplay *disp)
{
- GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
int arbitrary_max_interval = 1000;
/* default behavior for no SwapBuffers support: no vblank syncing
@@ -1288,34 +1288,9 @@ dri2_x11_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
return;
/* If we do have swapbuffers, then we can support pretty much any swap
- * interval, but we allow driconf to override applications.
+ * interval.
*/
- if (dri2_dpy->config)
- dri2_dpy->config->configQueryi(dri2_dpy->dri_screen,
- "vblank_mode", &vblank_mode);
- switch (vblank_mode) {
- case DRI_CONF_VBLANK_NEVER:
- dri2_dpy->min_swap_interval = 0;
- dri2_dpy->max_swap_interval = 0;
- dri2_dpy->default_swap_interval = 0;
- break;
- case DRI_CONF_VBLANK_ALWAYS_SYNC:
- dri2_dpy->min_swap_interval = 1;
- dri2_dpy->max_swap_interval = arbitrary_max_interval;
- dri2_dpy->default_swap_interval = 1;
- break;
- case DRI_CONF_VBLANK_DEF_INTERVAL_0:
- dri2_dpy->min_swap_interval = 0;
- dri2_dpy->max_swap_interval = arbitrary_max_interval;
- dri2_dpy->default_swap_interval = 0;
- break;
- default:
- case DRI_CONF_VBLANK_DEF_INTERVAL_1:
- dri2_dpy->min_swap_interval = 0;
- dri2_dpy->max_swap_interval = arbitrary_max_interval;
- dri2_dpy->default_swap_interval = 1;
- break;
- }
+ dri2_setup_swap_interval(disp, arbitrary_max_interval);
}
#ifdef HAVE_DRI3
@@ -1359,7 +1334,7 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
dri2_setup_screen(disp);
- dri2_x11_setup_swap_interval(dri2_dpy);
+ dri2_x11_setup_swap_interval(disp);
if (!dri2_dpy->is_different_gpu)
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
@@ -1459,7 +1434,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
dri2_setup_screen(disp);
- dri2_x11_setup_swap_interval(dri2_dpy);
+ dri2_x11_setup_swap_interval(disp);
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
disp->Extensions.NOK_swap_region = EGL_TRUE;