[Mesa-dev] [PATCH v2 3/3] mesa/st/i965: remove the allow_glsl_builtin_variable_redeclaration dri option

Timothy Arceri tarceri at itsqueeze.com
Sat May 12 04:49:11 UTC 2018


The previous patch changes the compiler to behave this way always so
we no longer need it.
---
 src/compiler/glsl/glsl_parser_extras.cpp            |  2 --
 src/compiler/glsl/glsl_parser_extras.h              |  1 -
 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/drivers/dri/i965/brw_context.c             |  3 ---
 src/mesa/drivers/dri/i965/intel_screen.c            |  1 -
 src/mesa/main/mtypes.h                              |  5 -----
 src/mesa/state_tracker/st_extensions.c              |  2 --
 src/util/drirc                                      | 11 -----------
 src/util/xmlpool/t_options.h                        |  5 -----
 11 files changed, 34 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 25003eeccce..c6ffdcc588c 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -304,8 +304,6 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
           sizeof(this->atomic_counter_offsets));
    this->allow_extension_directive_midshader =
       ctx->Const.AllowGLSLExtensionDirectiveMidShader;
-   this->allow_builtin_variable_redeclaration =
-      ctx->Const.AllowGLSLBuiltinVariableRedeclaration;
 
    this->cs_input_local_size_variable_specified = false;
 
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 5b9b6cc8621..794aa5dc2fd 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -848,7 +848,6 @@ struct _mesa_glsl_parse_state {
    unsigned atomic_counter_offsets[MAX_COMBINED_ATOMIC_BUFFERS];
 
    bool allow_extension_directive_midshader;
-   bool allow_builtin_variable_redeclaration;
 
    /**
     * Known subroutine type declarations.
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 21dc599dc26..85e3b699964 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -23,7 +23,6 @@ DRI_CONF_SECTION_DEBUG
    DRI_CONF_DISABLE_SHADER_BIT_ENCODING("false")
    DRI_CONF_FORCE_GLSL_VERSION(0)
    DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
-   DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION("false")
    DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH("false")
    DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
    DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index ec6e7844b87..b8fc833b356 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -222,7 +222,6 @@ struct st_config_options
    boolean force_glsl_extensions_warn;
    unsigned force_glsl_version;
    boolean allow_glsl_extension_directive_midshader;
-   boolean allow_glsl_builtin_variable_redeclaration;
    boolean allow_higher_compat_version;
    boolean glsl_zero_init;
    boolean force_glsl_abs_sqrt;
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index aaee9870776..c0df65aa5a6 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -74,8 +74,6 @@ dri_fill_st_options(struct dri_screen *screen)
       driQueryOptioni(optionCache, "force_glsl_version");
    options->allow_glsl_extension_directive_midshader =
       driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader");
-   options->allow_glsl_builtin_variable_redeclaration =
-      driQueryOptionb(optionCache, "allow_glsl_builtin_variable_redeclaration");
    options->allow_higher_compat_version =
       driQueryOptionb(optionCache, "allow_higher_compat_version");
    options->glsl_zero_init = driQueryOptionb(optionCache, "glsl_zero_init");
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index bd1e20845f0..c338dd4c29b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -836,9 +836,6 @@ brw_process_driconf_options(struct brw_context *brw)
    ctx->Const.AllowGLSLExtensionDirectiveMidShader =
       driQueryOptionb(options, "allow_glsl_extension_directive_midshader");
 
-   ctx->Const.AllowGLSLBuiltinVariableRedeclaration =
-      driQueryOptionb(options, "allow_glsl_builtin_variable_redeclaration");
-
    ctx->Const.AllowHigherCompatVersion =
       driQueryOptionb(options, "allow_higher_compat_version");
 
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 409f763b640..ef7efdeba24 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -84,7 +84,6 @@ DRI_CONF_BEGIN
       DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
       DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false")
       DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
-      DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION("false")
       DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH("false")
       DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
       DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2ef12a444ea..f7c8ed70353 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3712,11 +3712,6 @@ struct gl_constants
     */
    GLboolean AllowGLSLExtensionDirectiveMidShader;
 
-   /**
-    * Allow GLSL built-in variables to be redeclared verbatim
-    */
-   GLboolean AllowGLSLBuiltinVariableRedeclaration;
-
    /**
     * Allow GLSL interpolation qualifier mismatch across shader stages.
     */
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 19ef736e5b0..b022c2b5366 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -949,8 +949,6 @@ void st_init_extensions(struct pipe_screen *screen,
 
    consts->ForceGLSLAbsSqrt = options->force_glsl_abs_sqrt;
 
-   consts->AllowGLSLBuiltinVariableRedeclaration = options->allow_glsl_builtin_variable_redeclaration;
-
    consts->dri_config_options_sha1 = options->config_options_sha1;
 
    consts->AllowGLSLCrossStageInterpolationMismatch = options->allow_glsl_cross_stage_interpolation_mismatch;
diff --git a/src/util/drirc b/src/util/drirc
index c76f1ca4380..71efea353a6 100644
--- a/src/util/drirc
+++ b/src/util/drirc
@@ -87,17 +87,6 @@ TODO: document the other workarounds.
 
         <application name="Dead Island (incl. Definitive Edition)" executable="DeadIslandGame">
             <option name="allow_glsl_extension_directive_midshader" value="true" />
-
-            <!-- For the Definitive Edition which shares the same executable name -->
-            <option name="allow_glsl_builtin_variable_redeclaration" value="true" />
-        </application>
-
-        <application name="Dead Island Riptide Definitive Edition" executable="DeadIslandRiptideGame">
-            <option name="allow_glsl_builtin_variable_redeclaration" value="true" />
-        </application>
-
-        <application name="Dying Light" executable="DyingLightGame">
-            <option name="allow_glsl_builtin_variable_redeclaration" value="true" />
         </application>
 
         <application name="Second Life" executable="do-not-directly-run-secondlife-bin">
diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h
index 3ada813d639..53cd461b0f6 100644
--- a/src/util/xmlpool/t_options.h
+++ b/src/util/xmlpool/t_options.h
@@ -115,11 +115,6 @@ DRI_CONF_OPT_BEGIN_B(allow_glsl_extension_directive_midshader, def) \
         DRI_CONF_DESC(en,gettext("Allow GLSL #extension directives in the middle of shaders")) \
 DRI_CONF_OPT_END
 
-#define DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION(def) \
-DRI_CONF_OPT_BEGIN_B(allow_glsl_builtin_variable_redeclaration, def) \
-        DRI_CONF_DESC(en,gettext("Allow GLSL built-in variables to be redeclared verbatim")) \
-DRI_CONF_OPT_END
-
 #define DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(def) \
 DRI_CONF_OPT_BEGIN_B(allow_higher_compat_version, def) \
         DRI_CONF_DESC(en,gettext("Allow a higher compat profile (version 3.1+) for apps that request it")) \
-- 
2.17.0



More information about the mesa-dev mailing list