[Mesa-dev] [PATCH 2/2] mesa: remove allow_higher_compat_version drirc option

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Jun 22 13:11:25 UTC 2018


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 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                              | 7 -------
 src/mesa/main/version.c                             | 6 +-----
 src/mesa/state_tracker/st_extensions.c              | 2 --
 src/util/xmlpool/t_options.h                        | 5 -----
 9 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
index 90dbf658a6..afebde9396 100644
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h
@@ -27,7 +27,6 @@ DRI_CONF_SECTION_DEBUG
    DRI_CONF_ALLOW_GLSL_RELAXED_ES("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")
    DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD("false")
 DRI_CONF_SECTION_END
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 5b72c0afc9..c988e765ab 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -225,7 +225,6 @@ struct st_config_options
    boolean allow_glsl_builtin_const_expression;
    boolean allow_glsl_relaxed_es;
    boolean allow_glsl_builtin_variable_redeclaration;
-   boolean allow_higher_compat_version;
    boolean glsl_zero_init;
    boolean force_glsl_abs_sqrt;
    boolean allow_glsl_cross_stage_interpolation_mismatch;
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 87729c190a..fea0a1f036 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -80,8 +80,6 @@ dri_fill_st_options(struct dri_screen *screen)
       driQueryOptionb(optionCache, "allow_glsl_relaxed_es");
    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");
    options->force_glsl_abs_sqrt =
       driQueryOptionb(optionCache, "force_glsl_abs_sqrt");
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 9ced230ec1..3476b12239 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -839,9 +839,6 @@ brw_process_driconf_options(struct brw_context *brw)
    ctx->Const.AllowGLSLBuiltinVariableRedeclaration =
       driQueryOptionb(options, "allow_glsl_builtin_variable_redeclaration");
 
-   ctx->Const.AllowHigherCompatVersion =
-      driQueryOptionb(options, "allow_higher_compat_version");
-
    ctx->Const.ForceGLSLAbsSqrt =
       driQueryOptionb(options, "force_glsl_abs_sqrt");
 
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index cb357419a7..a19fd85ffd 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -86,7 +86,6 @@ DRI_CONF_BEGIN
       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")
 
       DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 0dfff31396..bc0b729425 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3749,13 +3749,6 @@ struct gl_constants
     */
    GLboolean AllowGLSLCrossStageInterpolationMismatch;
 
-   /**
-    * Allow creating a higher compat profile (version 3.1+) for apps that
-    * request it. Be careful when adding that driconf option because some
-    * features are unimplemented and might not work correctly.
-    */
-   GLboolean AllowHigherCompatVersion;
-
    /**
     * Force computing the absolute value for sqrt() and inversesqrt() to follow
     * D3D9 when apps rely on this behaviour.
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 2ba4c0b57f..6edb0ff3c1 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -580,11 +580,7 @@ _mesa_get_version(const struct gl_extensions *extensions,
 {
    switch (api) {
    case API_OPENGL_COMPAT:
-      /* Disable higher GLSL versions for legacy contexts.
-       * This disallows creation of higher compatibility contexts. */
-      if (!consts->AllowHigherCompatVersion) {
-         consts->GLSLVersion = consts->GLSLVersionCompat;
-      }
+      consts->GLSLVersion = consts->GLSLVersionCompat;
       /* fall through */
    case API_OPENGL_CORE:
       return compute_version(extensions, consts, api);
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 274df7bd6a..34132cbdba 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -950,8 +950,6 @@ void st_init_extensions(struct pipe_screen *screen,
       consts->ForceGLSLVersion = options->force_glsl_version;
    }
 
-   consts->AllowHigherCompatVersion = options->allow_higher_compat_version;
-
    consts->ForceGLSLAbsSqrt = options->force_glsl_abs_sqrt;
 
    consts->AllowGLSLBuiltinVariableRedeclaration = options->allow_glsl_builtin_variable_redeclaration;
diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h
index f0537e965b..c084dba420 100644
--- a/src/util/xmlpool/t_options.h
+++ b/src/util/xmlpool/t_options.h
@@ -130,11 +130,6 @@ 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")) \
-DRI_CONF_OPT_END
-
 #define DRI_CONF_FORCE_GLSL_ABS_SQRT(def) \
 DRI_CONF_OPT_BEGIN_B(force_glsl_abs_sqrt, def) \
         DRI_CONF_DESC(en,gettext("Force computing the absolute value for sqrt() and inversesqrt()")) \
-- 
2.17.1



More information about the mesa-dev mailing list