From 9d16f3903e2caddb7f674ca7ab7b1e96cfffbb2b Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 14 Feb 2017 16:18:24 +0100 Subject: driconf: add allow_higher_compat_version option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa currently doesn't allow to create 3.1+ compatibility profiles mainly because various features are unimplemented and bugs can happen. However, some buggy apps request a compat profile without using any old features unimplemented in mesa, and they fail to start. This option should help some games to run but it's not enough for all (eg. Dying Light). v2: - s/force_compat_profile/allow_higher_compat_version Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák Reviewed-by: Edmondo Tommasina Reviewed-by: Nicolai Hähnle --- src/mesa/drivers/dri/common/xmlpool/t_options.h | 5 +++++ src/mesa/drivers/dri/i965/brw_context.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/mesa/drivers/dri/common/xmlpool/t_options.h index a189bbedec6..f200093177d 100644 --- a/src/mesa/drivers/dri/common/xmlpool/t_options.h +++ b/src/mesa/drivers/dri/common/xmlpool/t_options.h @@ -115,6 +115,11 @@ 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_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 + /** diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 7240b1f4455..c56a14e3d66 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -916,6 +916,9 @@ brw_process_driconf_options(struct brw_context *brw) ctx->Const.AllowGLSLExtensionDirectiveMidShader = driQueryOptionb(options, "allow_glsl_extension_directive_midshader"); + ctx->Const.AllowHigherCompatVersion = + driQueryOptionb(options, "allow_higher_compat_version"); + ctx->Const.GLSLZeroInit = driQueryOptionb(options, "glsl_zero_init"); brw->dual_color_blend_by_location = -- cgit v1.2.3