diff options
author | Eric Anholt <[email protected]> | 2019-03-29 10:16:05 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-04-01 16:06:38 -0700 |
commit | edc7deec42bc5f97d0eae9f910d79c6bc31e05ce (patch) | |
tree | f8a21c50a786514b2bbde3c434021f57ebfbd598 /src | |
parent | 82f6a746e8b47fb6e3f96d7f5f69973f50eec9ca (diff) |
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: 9777c4234b0e ("loader: drop the [gs]et_swap_interval callbacks")
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/dri3_glx.c | 3 | ||||
-rw-r--r-- | src/glx/dri3_priv.h | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 9d023341e6b..8d5b9c2051e 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -649,7 +649,6 @@ dri3_set_swap_interval(__GLXDRIdrawable *pdraw, int interval) break; } - priv->swap_interval = interval; loader_dri3_set_swap_interval(&priv->loader_drawable, interval); return 0; @@ -666,7 +665,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 diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index 1d3c03f9997..32a8d3f7e7d 100644 --- a/src/glx/dri3_priv.h +++ b/src/glx/dri3_priv.h @@ -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; |