Mesa (staging/19.2): st/mesa: fix Sanctuary and Tropics by disabling ARB_gpu_shader5 for them

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 13 17:51:42 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 3a1843abeb372223efb7f548f33aae1be27aa781
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a1843abeb372223efb7f548f33aae1be27aa781

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Nov 11 17:04:15 2019 -0500

st/mesa: fix Sanctuary and Tropics by disabling ARB_gpu_shader5 for them

They use the "sample" keyword as a variable name.

Cc: 19.2 19.3 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
(cherry picked from commit e00791c5525000652472cdcfe55d59f43ec3d85e)

---

 src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 +
 src/gallium/include/state_tracker/st_api.h          | 1 +
 src/gallium/state_trackers/dri/dri_screen.c         | 2 ++
 src/mesa/state_tracker/st_extensions.c              | 2 +-
 src/util/00-mesa-defaults.conf                      | 2 ++
 src/util/xmlpool/t_options.h                        | 5 +++++
 6 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 8ccb6a0b454..6c7c630f43c 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -20,6 +20,7 @@ DRI_CONF_SECTION_DEBUG
    DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false")
    DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
    DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
+   DRI_CONF_DISABLE_ARB_GPU_SHADER5("false")
    DRI_CONF_FORCE_GLSL_VERSION(0)
    DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
    DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION("false")
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 516408c77c7..297954d70bf 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -219,6 +219,7 @@ struct st_config_options
 {
    bool disable_blend_func_extended;
    bool disable_glsl_line_continuations;
+   bool disable_arb_gpu_shader5;
    bool force_glsl_extensions_warn;
    unsigned force_glsl_version;
    bool allow_glsl_extension_directive_midshader;
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 67e956e1d21..2ee7c92cbc7 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -65,6 +65,8 @@ dri_fill_st_options(struct dri_screen *screen)
 
    options->disable_blend_func_extended =
       driQueryOptionb(optionCache, "disable_blend_func_extended");
+   options->disable_arb_gpu_shader5 =
+      driQueryOptionb(optionCache, "disable_arb_gpu_shader5");
    options->disable_glsl_line_continuations =
       driQueryOptionb(optionCache, "disable_glsl_line_continuations");
    options->force_glsl_extensions_warn =
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 50471d63f2b..c0362630185 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1091,7 +1091,7 @@ void st_init_extensions(struct pipe_screen *screen,
    if (api == API_OPENGLES2 && ESSLVersion >= 320)
       extensions->ARB_gpu_shader5 = GL_TRUE;
 
-   if (GLSLVersion >= 400)
+   if (GLSLVersion >= 400 && !options->disable_arb_gpu_shader5)
       extensions->ARB_gpu_shader5 = GL_TRUE;
    if (GLSLVersion >= 410)
       extensions->ARB_shader_precision = GL_TRUE;
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index 94a33480b12..d64ffdbf211 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -56,11 +56,13 @@ TODO: document the other workarounds.
         <application name="Unigine Sanctuary" executable="Sanctuary">
             <option name="force_glsl_extensions_warn" value="true" />
             <option name="disable_blend_func_extended" value="true" />
+            <option name="disable_arb_gpu_shader5" value="true" />
         </application>
 
         <application name="Unigine Tropics" executable="Tropics">
             <option name="force_glsl_extensions_warn" value="true" />
             <option name="disable_blend_func_extended" value="true" />
+            <option name="disable_arb_gpu_shader5" value="true" />
         </application>
 
         <application name="Unigine Heaven (32-bit)" executable="heaven_x86">
diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h
index 6e9c26a6c91..d267e9cf693 100644
--- a/src/util/xmlpool/t_options.h
+++ b/src/util/xmlpool/t_options.h
@@ -80,6 +80,11 @@ DRI_CONF_OPT_BEGIN_B(disable_blend_func_extended, def) \
         DRI_CONF_DESC(en,gettext("Disable dual source blending")) \
 DRI_CONF_OPT_END
 
+#define DRI_CONF_DISABLE_ARB_GPU_SHADER5(def) \
+DRI_CONF_OPT_BEGIN_B(disable_arb_gpu_shader5, def) \
+        DRI_CONF_DESC(en,"Disable GL_ARB_gpu_shader5") \
+DRI_CONF_OPT_END
+
 #define DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION(def) \
 DRI_CONF_OPT_BEGIN_B(dual_color_blend_by_location, def) \
         DRI_CONF_DESC(en,gettext("Identify dual color blending sources by location rather than index")) \




More information about the mesa-commit mailing list