glsl: drop NMS OpenGL workarounds
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 29 Oct 2020 06:06:44 +0000 (17:06 +1100)
committerMarge Bot <eric+marge@anholt.net>
Sun, 1 Nov 2020 05:57:35 +0000 (05:57 +0000)
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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7362>

src/compiler/glsl/glsl_parser.yy
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h
src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
src/gallium/frontends/dri/dri_screen.c
src/gallium/include/frontend/api.h
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c
src/util/00-mesa-defaults.conf
src/util/driconf.h

index ec2dd6a..e6ed701 100644 (file)
@@ -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
    {
index 48c0fc8..7daf65b 100644 (file)
@@ -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;
 
index e475e18..efd9e05 100644 (file)
@@ -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.
index 41051bc..f90112f 100644 (file)
@@ -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)
index 0e9f391..4de366f 100644 (file)
@@ -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 =
index d4f47a1..038e211 100644 (file)
@@ -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;
index b3de442..27cc5c9 100644 (file)
@@ -3871,11 +3871,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
     * allow them to exist and just issue a warning so some old applications
index 38370e1..7343c47 100644 (file)
@@ -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);
 
index 816169b..ca38c7d 100644 (file)
@@ -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>
index 92b9a8c..60d1314 100644 (file)
    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.")