i965: Support the force_glsl_version driconf option.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 21 Jan 2017 04:33:57 +0000 (20:33 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Jan 2017 02:20:57 +0000 (18:20 -0800)
Gallium drivers have had this for a while.  It makes sense to support
it consistently across drivers, so expose it in i965 as well.

Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_screen.c

index 0b3ac897aa00bb01caa16a6045b076b413f4600a..071de119f090ce0be960e753485ac4dbf759a8e3 100644 (file)
@@ -908,6 +908,9 @@ brw_process_driconf_options(struct brw_context *brw)
    ctx->Const.ForceGLSLExtensionsWarn =
       driQueryOptionb(options, "force_glsl_extensions_warn");
 
+   ctx->Const.ForceGLSLVersion =
+      driQueryOptioni(options, "force_glsl_version");
+
    ctx->Const.DisableGLSLLineContinuations =
       driQueryOptionb(options, "disable_glsl_line_continuations");
 
index 469d16cba66f6ccc750f610592a00aeb384bb86c..83b1f3ff556f79baf507a73eb3781f6be888a156 100644 (file)
@@ -79,6 +79,7 @@ DRI_CONF_BEGIN
       DRI_CONF_ALWAYS_FLUSH_CACHE("false")
       DRI_CONF_DISABLE_THROTTLING("false")
       DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false")
+      DRI_CONF_FORCE_GLSL_VERSION(0)
       DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
       DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
       DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false")