st/mesa: fix Sanctuary and Tropics by disabling ARB_gpu_shader5 for them
authorMarek Olšák <marek.olsak@amd.com>
Mon, 11 Nov 2019 22:04:15 +0000 (17:04 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 12 Nov 2019 00:23:37 +0000 (19:23 -0500)
They use the "sample" keyword as a variable name.

Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
src/gallium/include/state_tracker/st_api.h
src/gallium/state_trackers/dri/dri_screen.c
src/mesa/state_tracker/st_extensions.c
src/util/00-mesa-defaults.conf
src/util/xmlpool/t_options.h

index fee8fca642034331fb9594f75a35797214a65aa6..69967d916f2678314fd34ff843b7889411f5a4da 100644 (file)
@@ -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")
index 516408c77c7a48c4eeac41e4cea6fe9eea832d20..297954d70bffae39e067a16b655cb2824704e384 100644 (file)
@@ -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;
index 7898b088fc8ec018344957776607ef5d48862e30..8e4d5ca52dfd21bd4dd25e5a9bee4a9e215acb2f 100644 (file)
@@ -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 =
index ba912d35be897bd374d376b2929784457dd7258f..252e04c07168055544baa27a9b24f8ff28f8bef7 100644 (file)
@@ -1095,7 +1095,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;
index 94a33480b1231f65176273c3ac24d32b941685b2..d64ffdbf211f9c48d883df0a37044a633a0aa037 100644 (file)
@@ -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">
index e08ba1bf815c2725839f99631a882d19218128bd..7a665bfd65553f7c5b63ea187320512148006556 100644 (file)
@@ -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")) \