Mesa (master): gallium: handle drirc disable_glsl_line_continuations option

Vadim Girlin vadimg at kemper.freedesktop.org
Thu Apr 18 21:10:31 UTC 2013


Module: Mesa
Branch: master
Commit: f732036f12d67a96f546c11236fa635b3eda6e9c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f732036f12d67a96f546c11236fa635b3eda6e9c

Author: Vadim Girlin <vadimgirlin at gmail.com>
Date:   Fri Apr 19 01:04:51 2013 +0400

gallium: handle drirc disable_glsl_line_continuations option

NOTE: This is a candidate for the 9.1 branch

Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

---

 src/gallium/include/state_tracker/st_api.h         |    1 +
 .../state_trackers/dri/common/dri_context.c        |    2 ++
 src/gallium/state_trackers/dri/common/dri_screen.c |    3 ++-
 src/mesa/state_tracker/st_extensions.c             |    3 +++
 4 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 9f3d2a1..52c9dc0 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -240,6 +240,7 @@ struct st_visual
 struct st_config_options
 {
 	boolean force_glsl_extensions_warn;
+	boolean disable_glsl_line_continuations;
 };
 
 /**
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 49cd794..58a710d 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -54,6 +54,8 @@ static void dri_fill_st_options(struct st_config_options *options,
 {
    options->force_glsl_extensions_warn =
       driQueryOptionb(optionCache, "force_glsl_extensions_warn");
+   options->disable_glsl_line_continuations =
+      driQueryOptionb(optionCache, "disable_glsl_line_continuations");
 }
 
 GLboolean
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 2f525a2..fd2971c 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
@@ -66,6 +66,7 @@ PUBLIC const char __driConfigOptions[] =
 
       DRI_CONF_SECTION_DEBUG
          DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
+         DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
       DRI_CONF_SECTION_END
 
       DRI_CONF_SECTION_MISCELLANEOUS
@@ -75,7 +76,7 @@ PUBLIC const char __driConfigOptions[] =
 
 #define false 0
 
-static const uint __driNConfigOptions = 11;
+static const uint __driNConfigOptions = 12;
 
 static const __DRIconfig **
 dri_fill_in_modes(struct dri_screen *screen)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index f986480..ffb9f7e 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -714,6 +714,9 @@ void st_init_extensions(struct st_context *st)
    if (st->options.force_glsl_extensions_warn)
 	   ctx->Const.ForceGLSLExtensionsWarn = 1;
 
+   if (st->options.disable_glsl_line_continuations)
+	   ctx->Const.DisableGLSLLineContinuations = 1;
+
    ctx->Const.MinMapBufferAlignment =
       screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
    if (ctx->Const.MinMapBufferAlignment >= 64) {




More information about the mesa-commit mailing list