summaryrefslogtreecommitdiff
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2017-05-05 05:57:27 -0700
committerThomas Hellstrom <thellstrom@vmware.com>2017-06-07 19:43:54 +0200
commit9d3f177e4b1ecd5e6ac4673e1ac8c72df9e159eb (patch)
treeb879bccb3a7e663f4e66df740f8c74e79af24014 /src/glx/dri2_glx.c
parentff2978b44944790abd860548e111907588a23b0d (diff)
dri: Optionally turn off a couple of GLX extensions based on driconf options
With GLX_EXT_buffer_age turned on, gnome-shell will use full-screen damage with GLX, which severely hurts performance with architectures that emulate page-flips with copies. Like vmware. We would like to be able to turn off that extension. Similarly, typically the GLX_OML_sync_control doesn't make much sense on a virtual architecture since we don't really sync to the host's vertical retrace. We'd like to be able to turn it off as well. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 4f163688f2c..ae8cb11ef8f 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1311,12 +1311,17 @@ dri2CreateScreen(int screen, struct glx_display * priv)
psp->getBufferAge = NULL;
if (pdp->driMinor >= 2) {
+ unsigned char disable;
+
psp->getDrawableMSC = dri2DrawableGetMSC;
psp->waitForMSC = dri2WaitForMSC;
psp->waitForSBC = dri2WaitForSBC;
psp->setSwapInterval = dri2SetSwapInterval;
psp->getSwapInterval = dri2GetSwapInterval;
- __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
+ if (psc->config->configQueryb(psc->driScreen,
+ "glx_disable_oml_sync_control",
+ &disable) || !disable)
+ __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
}
/* DRI2 supports SubBuffer through DRI2CopyRegion, so it's always