i965: Support the allow_glsl_extension_directive_midshader option.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 8 Aug 2014 08:03:15 +0000 (01:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 10 Aug 2014 23:22:31 +0000 (16:22 -0700)
This adds support for Marek's new driconf parameter, which avoids
totally white rendering in Unigine Valley (which attempts to enable
the GL_ARB_sample_shading extension in an illegal place).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75664
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c

index 52f2557504a31e8c5723be7aae5c7a5a4eb3257c..402d936bd70a8974fcf18457f57fa92f50255b37 100644 (file)
@@ -570,6 +570,9 @@ brw_process_driconf_options(struct brw_context *brw)
 
    ctx->Const.DisableGLSLLineContinuations =
       driQueryOptionb(options, "disable_glsl_line_continuations");
+
+   ctx->Const.AllowGLSLExtensionDirectiveMidShader =
+      driQueryOptionb(options, "allow_glsl_extension_directive_midshader");
 }
 
 GLboolean
index 5ebf1d505aeb319f6bbf126a2db8cf6dbff300f5..ea0fc5814ff3d9419e249264f6103e14d6a50eec 100644 (file)
@@ -84,6 +84,7 @@ DRI_CONF_BEGIN
       DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false")
       DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
       DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
+      DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false")
 
       DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
         DRI_CONF_DESC(en, "Perform code generation at shader link time.")