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

Author: Martin Peres <[email protected]>
Date:   Tue Oct 20 16:20:20 2020 +0300

driconf: add a way to override indirect-GL extensions

Support for DRI1 is not implemented, but who still uses that?

Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Martin Peres <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>

---

 docs/relnotes/new_features.txt                      | 1 +
 src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 +
 src/glx/dri2_glx.c                                  | 6 ++++++
 src/glx/dri3_glx.c                                  | 6 ++++++
 src/mesa/drivers/dri/common/dri_util.c              | 1 +
 src/util/driconf.h                                  | 3 +++
 6 files changed, 18 insertions(+)

diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index f4e80ebde5e..9cc3008f9e7 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -12,3 +12,4 @@ VK_KHR_shader_terminate_invocation on RADV
 NGG GS support in ACO
 VK_KHR_shader_terminate_invocation on ANV
 driconf: add glx_extension_override
+driconf: add indirect_gl_extension_override
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h 
b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 6691b2f7fba..95e27bcc42d 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -38,6 +38,7 @@ DRI_CONF_SECTION_DEBUG
    DRI_CONF_FORCE_GL_VENDOR()
    DRI_CONF_OVERRIDE_VRAM_SIZE()
    DRI_CONF_GLX_EXTENSION_OVERRIDE()
+   DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE()
 DRI_CONF_SECTION_END
 
 DRI_CONF_SECTION_MISCELLANEOUS
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index e449f34a04e..a42de142fa2 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1367,6 +1367,12 @@ dri2CreateScreen(int screen, struct glx_display * priv)
                                     &tmp) == 0)
       __glXParseExtensionOverride(&psc->base, tmp);
 
+   if (psc->config->base.version > 1 &&
+          psc->config->configQuerys(psc->driScreen,
+                                    "indirect_gl_extension_override",
+                                    &tmp) == 0)
+      __IndirectGlParseExtensionOverride(&psc->base, tmp);
+
    /* DRI2 supports SubBuffer through DRI2CopyRegion, so it's always
     * available.*/
    psp->copySubBuffer = dri2CopySubBuffer;
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 97933874537..394fdfa4b1b 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -1003,6 +1003,12 @@ dri3_create_screen(int screen, struct glx_display * priv)
                                     &tmp) == 0)
       __glXParseExtensionOverride(&psc->base, tmp);
 
+   if (psc->config->base.version > 1 &&
+          psc->config->configQuerys(psc->driScreen,
+                                    "indirect_gl_extension_override",
+                                    &tmp) == 0)
+      __IndirectGlParseExtensionOverride(&psc->base, tmp);
+
    free(driverName);
 
    tmp = getenv("LIBGL_SHOW_FPS");
diff --git a/src/mesa/drivers/dri/common/dri_util.c 
b/src/mesa/drivers/dri/common/dri_util.c
index 1bea3d13326..e2a11240dea 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -54,6 +54,7 @@
 driOptionDescription __dri2ConfigOptions[] = {
       DRI_CONF_SECTION_DEBUG
          DRI_CONF_GLX_EXTENSION_OVERRIDE()
+         DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE()
       DRI_CONF_SECTION_END
 
       DRI_CONF_SECTION_PERFORMANCE
diff --git a/src/util/driconf.h b/src/util/driconf.h
index 326d58ca8b7..c67b0b697dc 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -221,6 +221,9 @@
    DRI_CONF_OPT_S(glx_extension_override, def, \
                   "Allow enabling/disabling a list of GLX extensions")
 
+#define DRI_CONF_INDIRECT_GL_EXTENSION_OVERRIDE(def) \
+   DRI_CONF_OPT_S(indirect_gl_extension_override, def, \
+                  "Allow enabling/disabling a list of indirect-GL extensions")
 
 
 /**

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to