Mesa (master): driconf: remove the redundant glx-extension-disabling options

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 13 07:23:01 UTC 2020


Module: Mesa
Branch: master
Commit: 580fbbb59a601c5eb858a53a4924c87da7e253f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=580fbbb59a601c5eb858a53a4924c87da7e253f9

Author: Martin Peres <martin.peres at mupuf.org>
Date:   Wed Oct 21 10:40:29 2020 +0300

driconf: remove the redundant glx-extension-disabling options

Now that we introduced the generic glx_extension_override option,
we can remove the glx_disable_oml_sync_control,
glx_disable_sgi_video_sync, and glx_disable_ext_buffer_age ones.

It seems like the only user for them was the vmwgfx, and only for
Gnome and Compiz which are covered by the default mesa driconf. This
means that it is unlikely for a user to have these options set in
their local driconf file.

Suggested-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Signed-off-by: Martin Peres <martin.peres at mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7252>

---

 docs/relnotes/new_features.txt                      |  1 +
 src/gallium/auxiliary/pipe-loader/driinfo_gallium.h |  3 ---
 src/glx/dri2_glx.c                                  | 12 +++---------
 src/glx/dri3_glx.c                                  | 16 +++-------------
 src/util/00-mesa-defaults.conf                      |  7 ++-----
 src/util/driconf.h                                  | 13 -------------
 6 files changed, 9 insertions(+), 43 deletions(-)

diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index 63303927039..90d8e0096e3 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -1,2 +1,3 @@
 GL_EXT_demote_to_helper_invocation on radeonsi
 EGL_MESA_platform_xcb
+driconf: remove glx_disable_oml_sync_control, glx_disable_sgi_video_sync, and glx_disable_ext_buffer_age
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 6a166f15fcb..698d8e94395 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -2,9 +2,6 @@
 DRI_CONF_SECTION_PERFORMANCE
    DRI_CONF_MESA_GLTHREAD(false)
    DRI_CONF_MESA_NO_ERROR(false)
-   DRI_CONF_DISABLE_EXT_BUFFER_AGE(false)
-   DRI_CONF_DISABLE_OML_SYNC_CONTROL(false)
-   DRI_CONF_DISABLE_SGI_VIDEO_SYNC(false)
 DRI_CONF_SECTION_END
 
 DRI_CONF_SECTION_QUALITY
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index a42de142fa2..724a17443db 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1232,7 +1232,6 @@ dri2CreateScreen(int screen, struct glx_display * priv)
    char *driverName = NULL, *loader_driverName, *deviceName, *tmp;
    drm_magic_t magic;
    int i;
-   unsigned char disable;
 
    psc = calloc(1, sizeof *psc);
    if (psc == NULL)
@@ -1351,16 +1350,11 @@ dri2CreateScreen(int screen, struct glx_display * priv)
       psp->waitForSBC = dri2WaitForSBC;
       psp->setSwapInterval = dri2SetSwapInterval;
       psp->getSwapInterval = dri2GetSwapInterval;
-      if (psc->config->configQueryb(psc->driScreen,
-                                    "glx_disable_oml_sync_control",
-                                    &disable) || !disable)
-         __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
+
+      __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
    }
 
-   if (psc->config->configQueryb(psc->driScreen,
-                                 "glx_disable_sgi_video_sync",
-                                 &disable) || !disable)
-      __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
+   __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
 
    if (psc->config->base.version > 1 &&
           psc->config->configQuerys(psc->driScreen, "glx_extension_override",
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 394fdfa4b1b..c2685cc693d 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -847,7 +847,6 @@ dri3_create_screen(int screen, struct glx_display * priv)
    struct glx_config *configs = NULL, *visuals = NULL;
    char *driverName, *tmp;
    int i;
-   unsigned char disable;
 
    psc = calloc(1, sizeof *psc);
    if (psc == NULL)
@@ -979,24 +978,15 @@ dri3_create_screen(int screen, struct glx_display * priv)
    psp->waitForSBC = dri3_wait_for_sbc;
    psp->setSwapInterval = dri3_set_swap_interval;
    psp->getSwapInterval = dri3_get_swap_interval;
-   if (psc->config->configQueryb(psc->driScreen,
-                                 "glx_disable_oml_sync_control",
-                                 &disable) || !disable)
-      __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
 
-   if (psc->config->configQueryb(psc->driScreen,
-                                 "glx_disable_sgi_video_sync",
-                                 &disable) || !disable)
-      __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
+   __glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
+   __glXEnableDirectExtension(&psc->base, "GLX_SGI_video_sync");
 
    psp->copySubBuffer = dri3_copy_sub_buffer;
    __glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
 
    psp->getBufferAge = dri3_get_buffer_age;
-   if (psc->config->configQueryb(psc->driScreen,
-                                 "glx_disable_ext_buffer_age",
-                                 &disable) || !disable)
-      __glXEnableDirectExtension(&psc->base, "GLX_EXT_buffer_age");
+   __glXEnableDirectExtension(&psc->base, "GLX_EXT_buffer_age");
 
    if (psc->config->base.version > 1 &&
           psc->config->configQuerys(psc->driScreen, "glx_extension_override",
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index ca38c7da2e1..c5f78ade8a1 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -619,13 +619,10 @@ TODO: document the other workarounds.
     <!-- vmwgfx doesn't like full buffer swaps and can't sync to vertical retraces.-->
     <device driver="vmwgfx">
         <application name="gnome-shell" executable="gnome-shell">
-            <option name="glx_disable_ext_buffer_age" value="true" />
-            <option name="glx_disable_oml_sync_control" value="true" />
-            <option name="glx_disable_sgi_video_sync" value="true" />
+            <option name="glx_extension_override" value="-GLX_EXT_buffer_age -GLX_OML_sync_control -GLX_SGI_video_sync" />
         </application>
         <application name="Compiz" executable="Compiz">
-            <option name="glx_disable_ext_buffer_age" value="true" />
-            <option name="glx_disable_oml_sync_control" value="true" />
+            <option name="glx_extension_override" value="-GLX_EXT_buffer_age -GLX_OML_sync_control" />
         </application>
     </device>
     <device driver="radeonsi">
diff --git a/src/util/driconf.h b/src/util/driconf.h
index 7f838cdf6ad..b09ca1f3a7d 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -311,19 +311,6 @@
    DRI_CONF_OPT_B(mesa_no_error, def, \
                   "Disable GL driver error checking")
 
-#define DRI_CONF_DISABLE_EXT_BUFFER_AGE(def) \
-   DRI_CONF_OPT_B(glx_disable_ext_buffer_age, def, \
-                  "Disable the GLX_EXT_buffer_age extension")
-
-#define DRI_CONF_DISABLE_OML_SYNC_CONTROL(def) \
-   DRI_CONF_OPT_B(glx_disable_oml_sync_control, def, \
-                  "Disable the GLX_OML_sync_control extension")
-
-#define DRI_CONF_DISABLE_SGI_VIDEO_SYNC(def) \
-   DRI_CONF_OPT_B(glx_disable_sgi_video_sync, def, \
-                  "Disable the GLX_SGI_video_sync extension")
-
-
 
 /**
  * \brief Miscellaneous configuration options



More information about the mesa-commit mailing list