summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-09-25 14:05:30 -0700
committerEric Anholt <[email protected]>2012-10-09 14:32:03 -0700
commit7e9bd2b2ed35a440a96362417100a7e43715d606 (patch)
treea7d339d8749b99bece69523d052c5b9b596e681a /src/egl/drivers/dri2/egl_dri2.c
parent8c472b8f6a612a810aec34283d90bb5aa88bf855 (diff)
egl: Add support for driconf control of swapinterval.
This behavior mostly matches glx_dri2. It's slightly complicated in comparison because EGL exposes the implementation limits in the EGL config. Note that platform_x11 was the only one setting swap_available, so the move of the MaxSwapInterval into it is appropriate. Acked-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 4b58c35b46b..ae082f60fbf 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -262,10 +262,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
if (double_buffer) {
surface_type &= ~EGL_PIXMAP_BIT;
- if (dri2_dpy->swap_available) {
- conf->base.MinSwapInterval = 0;
- conf->base.MaxSwapInterval = 1000; /* XXX arbitrary value */
- }
+ conf->base.MinSwapInterval = dri2_dpy->min_swap_interval;
+ conf->base.MaxSwapInterval = dri2_dpy->max_swap_interval;
}
conf->base.SurfaceType |= surface_type;
@@ -533,6 +531,9 @@ dri2_create_screen(_EGLDisplay *disp)
if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0) {
dri2_dpy->robustness = (__DRIrobustnessExtension *) extensions[i];
}
+ if (strcmp(extensions[i]->name, __DRI2_CONFIG_QUERY) == 0) {
+ dri2_dpy->config = (__DRI2configQueryExtension *) extensions[i];
+ }
}
} else {
assert(dri2_dpy->swrast);