unsigned force_glsl_version;
boolean force_s3tc_enable;
boolean allow_glsl_extension_directive_midshader;
+ boolean allow_higher_compat_version;
boolean glsl_zero_init;
};
DRI_CONF_DISABLE_SHADER_BIT_ENCODING("false")
DRI_CONF_FORCE_GLSL_VERSION(0)
DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
+ DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_MISCELLANEOUS
driQueryOptionb(optionCache, "force_s3tc_enable");
options->allow_glsl_extension_directive_midshader =
driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader");
+ options->allow_higher_compat_version =
+ driQueryOptionb(optionCache, "allow_higher_compat_version");
options->glsl_zero_init = driQueryOptionb(optionCache, "glsl_zero_init");
}
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
+
/**
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 =
*/
GLboolean AllowGLSLExtensionDirectiveMidShader;
+ /**
+ * 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 uninitialized variables to default to zero.
*/
case API_OPENGL_COMPAT:
/* Disable GLSL 1.40 and later for legacy contexts.
* This disallows creation of the GL 3.1 compatibility context. */
- if (consts->GLSLVersion > 130) {
- consts->GLSLVersion = 130;
+ if (!consts->AllowHigherCompatVersion) {
+ if (consts->GLSLVersion > 130) {
+ consts->GLSLVersion = 130;
+ }
}
/* fall through */
case API_OPENGL_CORE:
consts->ForceGLSLVersion = options->force_glsl_version;
}
+ consts->AllowHigherCompatVersion = options->allow_higher_compat_version;
+
if (consts->GLSLVersion >= 400)
extensions->ARB_gpu_shader5 = GL_TRUE;
if (consts->GLSLVersion >= 410)