Commit 2b50357c authored by Eric Anholt's avatar Eric Anholt Committed by Emil Velikov

dri3: Return the current swap interval from glXGetSwapIntervalMESA().

We were caching only the value set with glXSwapIntervalSGI(), missing out
on the default setting of the swap interval by the loader.  This fixes
glxgears's warning about being vblank synchronized by default.

Fixes: 9777c423 ("loader: drop the [gs]et_swap_interval callbacks")
Reviewed-by: 's avatarIan Romanick <>
(cherry picked from commit edc7deec)
parent 12ab2d00
......@@ -642,7 +642,6 @@ dri3_set_swap_interval(__GLXDRIdrawable *pdraw, int interval)
priv->swap_interval = interval;
loader_dri3_set_swap_interval(&priv->loader_drawable, interval);
return 0;
......@@ -659,7 +658,7 @@ dri3_get_swap_interval(__GLXDRIdrawable *pdraw)
struct dri3_drawable *priv = (struct dri3_drawable *) pdraw;
return priv->swap_interval;
return priv->loader_drawable.swap_interval;
static void
......@@ -117,7 +117,6 @@ struct dri3_context
struct dri3_drawable {
__GLXDRIdrawable base;
struct loader_dri3_drawable loader_drawable;
int swap_interval;
/* LIBGL_SHOW_FPS support */
uint64_t previous_ust;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment