boolean allow_glsl_extension_directive_midshader;
boolean allow_higher_compat_version;
boolean glsl_zero_init;
+ boolean force_glsl_abs_sqrt;
unsigned char config_options_sha1[20];
};
DRI_CONF_FORCE_GLSL_VERSION(0)
DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
+ DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_MISCELLANEOUS
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");
driComputeOptionsSha1(optionCache, options->config_options_sha1);
}
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()")) \
+DRI_CONF_OPT_END
+
/**
ctx->Const.AllowHigherCompatVersion =
driQueryOptionb(options, "allow_higher_compat_version");
+ ctx->Const.ForceGLSLAbsSqrt =
+ driQueryOptionb(options, "force_glsl_abs_sqrt");
+
ctx->Const.GLSLZeroInit = driQueryOptionb(options, "glsl_zero_init");
brw->dual_color_blend_by_location =
DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false")
DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false")
+ DRI_CONF_FORCE_GLSL_ABS_SQRT("false")
DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
DRI_CONF_DESC(en, "Perform code generation at shader link time.")
GLboolean AllowHigherCompatVersion;
/**
+ * Force computing the absolute value for sqrt() and inversesqrt() to follow
+ * D3D9 when apps rely on this behaviour.
+ */
+ GLboolean ForceGLSLAbsSqrt;
+
+ /**
* Force uninitialized variables to default to zero.
*/
GLboolean GLSLZeroInit;
consts->AllowHigherCompatVersion = options->allow_higher_compat_version;
+ consts->ForceGLSLAbsSqrt = options->force_glsl_abs_sqrt;
+
consts->dri_config_options_sha1 = options->config_options_sha1;
if (consts->GLSLVersion >= 400)