Mesa (master): glsl: drop NMS OpenGL workarounds

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 1 06:12:44 UTC 2020


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

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Thu Oct 29 17:06:44 2020 +1100

glsl: drop NMS OpenGL workarounds

No Mans Sky dropped its OpenGL backend on April 16, 2019 in favour
of its Vulkan backend. So here we drop the old OpenGL workarounds.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7362>

---

 src/compiler/glsl/glsl_parser.yy                    | 16 ++--------------
 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/frontends/dri/dri_screen.c              |  2 --
 src/gallium/include/frontend/api.h                  |  1 -
 src/mesa/main/mtypes.h                              |  5 -----
 src/mesa/state_tracker/st_extensions.c              |  3 ---
 src/util/00-mesa-defaults.conf                      |  8 --------
 src/util/driconf.h                                  |  4 ----
 10 files changed, 2 insertions(+), 41 deletions(-)

diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy
index ec2dd6a0513..e6ed70176c3 100644
--- a/src/compiler/glsl/glsl_parser.yy
+++ b/src/compiler/glsl/glsl_parser.yy
@@ -917,20 +917,8 @@ parameter_declarator:
    }
    | layout_qualifier type_specifier any_identifier
    {
-      if (state->allow_layout_qualifier_on_function_parameter) {
-         void *ctx = state->linalloc;
-         $$ = new(ctx) ast_parameter_declarator();
-         $$->set_location_range(@2, @3);
-         $$->type = new(ctx) ast_fully_specified_type();
-         $$->type->set_location(@2);
-         $$->type->specifier = $2;
-         $$->identifier = $3;
-         state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto));
-      } else {
-         _mesa_glsl_error(&@1, state,
-                          "is is not allowed on function parameter");
-         YYERROR;
-      }
+      _mesa_glsl_error(&@1, state, "is is not allowed on function parameter");
+      YYERROR;
    }
    | type_specifier any_identifier array_specifier
    {
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 48c0fc8f217..7daf65bef6d 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -321,8 +321,6 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
       ctx->Const.AllowGLSL120SubsetIn110;
    this->allow_builtin_variable_redeclaration =
       ctx->Const.AllowGLSLBuiltinVariableRedeclaration;
-   this->allow_layout_qualifier_on_function_parameter =
-      ctx->Const.AllowLayoutQualifiersOnFunctionParameters;
 
    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 e475e18fdd9..efd9e05f4d5 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -943,7 +943,6 @@ struct _mesa_glsl_parse_state {
    bool allow_extension_directive_midshader;
    bool allow_glsl_120_subset_in_110;
    bool allow_builtin_variable_redeclaration;
-   bool allow_layout_qualifier_on_function_parameter;
 
    /**
     * 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 41051bc6447..f90112f25d9 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -32,7 +32,6 @@ DRI_CONF_SECTION_DEBUG
    DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION(false)
    DRI_CONF_FORCE_GLSL_ABS_SQRT(false)
    DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD(false)
-   DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS(false)
    DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(false)
    DRI_CONF_FORCE_COMPAT_PROFILE(false)
    DRI_CONF_FORCE_GL_NAMES_REUSE(false)
diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c
index 0e9f39170e2..4de366f452a 100644
--- a/src/gallium/frontends/dri/dri_screen.c
+++ b/src/gallium/frontends/dri/dri_screen.c
@@ -95,8 +95,6 @@ dri_fill_st_options(struct dri_screen *screen)
       driQueryOptionb(optionCache, "force_glsl_abs_sqrt");
    options->allow_glsl_cross_stage_interpolation_mismatch =
       driQueryOptionb(optionCache, "allow_glsl_cross_stage_interpolation_mismatch");
-   options->allow_glsl_layout_qualifier_on_function_parameters =
-      driQueryOptionb(optionCache, "allow_glsl_layout_qualifier_on_function_parameters");
    options->allow_draw_out_of_order =
       driQueryOptionb(optionCache, "allow_draw_out_of_order");
    options->force_gl_names_reuse =
diff --git a/src/gallium/include/frontend/api.h b/src/gallium/include/frontend/api.h
index d4f47a1bfdc..038e21199f9 100644
--- a/src/gallium/include/frontend/api.h
+++ b/src/gallium/include/frontend/api.h
@@ -231,7 +231,6 @@ struct st_config_options
    bool vs_position_always_invariant;
    bool force_glsl_abs_sqrt;
    bool allow_glsl_cross_stage_interpolation_mismatch;
-   bool allow_glsl_layout_qualifier_on_function_parameters;
    bool allow_draw_out_of_order;
    bool force_integer_tex_nearest;
    bool force_gl_names_reuse;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b3de4427ded..27cc5c961a0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3870,11 +3870,6 @@ struct gl_constants
     */
    GLboolean AllowHigherCompatVersion;
 
-   /**
-    * Allow layout qualifiers on function parameters.
-    */
-   GLboolean AllowLayoutQualifiersOnFunctionParameters;
-
    /**
     * Allow extra tokens at end of preprocessor directives. The CTS now tests
     * to make sure these are not allowed. However, previously drivers would
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 38370e1e6d6..7343c4777f4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -1426,9 +1426,6 @@ void st_init_extensions(struct pipe_screen *screen,
    if (options->allow_glsl_relaxed_es)
       consts->AllowGLSLRelaxedES = GL_TRUE;
 
-   if (options->allow_glsl_layout_qualifier_on_function_parameters)
-      consts->AllowLayoutQualifiersOnFunctionParameters = GL_TRUE;
-
    consts->MinMapBufferAlignment =
       screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
 
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf
index 816169b40c3..ca38c7da2e1 100644
--- a/src/util/00-mesa-defaults.conf
+++ b/src/util/00-mesa-defaults.conf
@@ -241,11 +241,6 @@ TODO: document the other workarounds.
             <option name="allow_glsl_relaxed_es" value="true"/>
         </application>
 
-        <application name="No Mans Sky" executable="NMS.exe">
-            <option name="force_glsl_extensions_warn" value="true" />
-            <option name="allow_glsl_layout_qualifier_on_function_parameters" value="true" />
-        </application>
-
         <application name="Champions of Regnum" executable="game">
             <option name="allow_extra_pp_tokens" value="true" />
         </application>
@@ -643,9 +638,6 @@ TODO: document the other workarounds.
         <application name="Counter-Strike Global Offensive" executable="csgo_linux64">
             <option name="radeonsi_zerovram" value="true" />
         </application>
-        <application name="No Mans Sky" executable="NMS.exe">
-            <option name="radeonsi_zerovram" value="true" />
-        </application>
         <application name="Rocket League" executable="RocketLeague">
             <option name="radeonsi_zerovram" value="true" />
         </application>
diff --git a/src/util/driconf.h b/src/util/driconf.h
index 92b9a8c04c5..60d1314f888 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -199,10 +199,6 @@
    DRI_CONF_OPT_B(allow_glsl_cross_stage_interpolation_mismatch, def,   \
                   "Allow interpolation qualifier mismatch across shader stages")
 
-#define DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS(def) \
-   DRI_CONF_OPT_B(allow_glsl_layout_qualifier_on_function_parameters, def, \
-                  "Allow layout qualifiers on function parameters.")
-
 #define DRI_CONF_ALLOW_DRAW_OUT_OF_ORDER(def) \
    DRI_CONF_OPT_B(allow_draw_out_of_order, def, \
                   "Allow out-of-order draw optimizations. Set when Z fighting doesn't have to be accurate.")



More information about the mesa-commit mailing list