This has the side effect of enabling this option for the intel i830, nouveau_vieux, classic swrast, and the classic radeon drivers.
Signed-off-by: Martin Peres <martin.pe...@linux.intel.com> --- src/gallium/include/state_tracker/st_api.h | 1 - src/gallium/state_trackers/dri/dri_screen.c | 3 --- src/gallium/state_trackers/osmesa/osmesa.c | 1 - src/glsl/glcpp/glcpp.c | 4 ++-- src/glsl/glcpp/pp.c | 2 +- src/mesa/drivers/dri/common/xmlpool.h | 3 ++- src/mesa/drivers/dri/i915/intel_screen.c | 1 - src/mesa/drivers/dri/i965/brw_context.c | 3 --- src/mesa/drivers/dri/i965/intel_screen.c | 1 - src/mesa/main/mtypes.h | 6 ------ src/mesa/main/shared_options.c | 3 +++ src/mesa/main/shared_options.h | 7 +++++++ src/mesa/state_tracker/st_extensions.c | 3 --- 13 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 2d19e91..f6aade2 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -245,7 +245,6 @@ struct st_config_options struct shared_options shared_options; boolean disable_blend_func_extended; - boolean disable_glsl_line_continuations; boolean disable_shader_bit_encoding; boolean force_s3tc_enable; }; diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index f5b5a57..69c5369 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -70,7 +70,6 @@ const __DRIconfigOptionsExtension gallium_config_options = { DRI_CONF_SECTION_DEBUG DRI_CONF_SECTION_DEBUG_SHARED - DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") DRI_CONF_DISABLE_SHADER_BIT_ENCODING("false") DRI_CONF_SECTION_END @@ -92,8 +91,6 @@ dri_fill_st_options(struct st_config_options *options, options->disable_blend_func_extended = driQueryOptionb(optionCache, "disable_blend_func_extended"); - options->disable_glsl_line_continuations = - driQueryOptionb(optionCache, "disable_glsl_line_continuations"); options->disable_shader_bit_encoding = driQueryOptionb(optionCache, "disable_shader_bit_encoding"); options->force_s3tc_enable = diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c index cebc4ec..6478af8 100644 --- a/src/gallium/state_trackers/osmesa/osmesa.c +++ b/src/gallium/state_trackers/osmesa/osmesa.c @@ -586,7 +586,6 @@ OSMesaCreateContextExt(GLenum format, GLint depthBits, GLint stencilBits, attribs.minor = 1; attribs.flags = 0; /* ST_CONTEXT_FLAG_x */ attribs.options.disable_blend_func_extended = FALSE; - attribs.options.disable_glsl_line_continuations = FALSE; attribs.options.disable_shader_bit_encoding = FALSE; attribs.options.force_s3tc_enable = FALSE; _mesa_shared_options_fill_defaults(&attribs.options.shared_options); diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c index 5144516..ac0b587 100644 --- a/src/glsl/glcpp/glcpp.c +++ b/src/glsl/glcpp/glcpp.c @@ -102,7 +102,7 @@ static void init_fake_gl_context (struct gl_context *gl_ctx) { gl_ctx->API = API_OPENGL_COMPAT; - gl_ctx->Const.DisableGLSLLineContinuations = false; + gl_ctx->Const.options.DisableGLSLLineContinuations = false; } static void @@ -144,7 +144,7 @@ main (int argc, char *argv[]) while ((c = getopt_long(argc, argv, "d", long_options, NULL)) != -1) { switch (c) { case DISABLE_LINE_CONTINUATIONS_OPT: - gl_ctx.Const.DisableGLSLLineContinuations = true; + gl_ctx.Const.options.DisableGLSLLineContinuations = true; break; case 'd': glcpp_parser_debug = 1; diff --git a/src/glsl/glcpp/pp.c b/src/glsl/glcpp/pp.c index 160c666..7e02dae 100644 --- a/src/glsl/glcpp/pp.c +++ b/src/glsl/glcpp/pp.c @@ -218,7 +218,7 @@ glcpp_preprocess(void *ralloc_ctx, const char **shader, char **info_log, int errors; glcpp_parser_t *parser = glcpp_parser_create (extensions, gl_ctx->API); - if (! gl_ctx->Const.DisableGLSLLineContinuations) + if (! gl_ctx->Const.options.DisableGLSLLineContinuations) *shader = remove_line_continuations(parser, *shader); glcpp_lex_set_source_string (parser, *shader); diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/mesa/drivers/dri/common/xmlpool.h index f6953b4..b2480d6 100644 --- a/src/mesa/drivers/dri/common/xmlpool.h +++ b/src/mesa/drivers/dri/common/xmlpool.h @@ -111,7 +111,8 @@ #define DRI_CONF_SECTION_DEBUG_SHARED \ DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false") \ DRI_CONF_FORCE_GLSL_VERSION(0) \ - DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false") + DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false") \ + DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") #define DRI_CONF_SECTION_MISC_SHARED \ "<!-- No shared msic options yet -->\n" diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 0098840..91ec6c3 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -74,7 +74,6 @@ DRI_CONF_BEGIN DRI_CONF_ALWAYS_FLUSH_BATCH("false") DRI_CONF_ALWAYS_FLUSH_CACHE("false") DRI_CONF_DISABLE_THROTTLING("false") - DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") DRI_CONF_OPT_BEGIN_B(shader_precompile, "true") diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index a94e21d5..8bd74e2 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -683,9 +683,6 @@ brw_process_driconf_options(struct brw_context *brw) } brw->precompile = driQueryOptionb(&brw->optionCache, "shader_precompile"); - - ctx->Const.DisableGLSLLineContinuations = - driQueryOptionb(options, "disable_glsl_line_continuations"); } GLboolean diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 9f0d9d0..017d638 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -81,7 +81,6 @@ DRI_CONF_BEGIN DRI_CONF_ALWAYS_FLUSH_BATCH("false") DRI_CONF_ALWAYS_FLUSH_CACHE("false") DRI_CONF_DISABLE_THROTTLING("false") - DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") DRI_CONF_OPT_BEGIN_B(shader_precompile, "true") diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0839870..5c257c1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3504,12 +3504,6 @@ struct gl_constants */ GLuint64 MaxElementIndex; - /** - * Disable interpretation of line continuations (lines ending with a - * backslash character ('\') in GLSL source. - */ - GLboolean DisableGLSLLineContinuations; - /** GL_ARB_texture_multisample */ GLint MaxColorTextureSamples; GLint MaxDepthTextureSamples; diff --git a/src/mesa/main/shared_options.c b/src/mesa/main/shared_options.c index a5b5c97..ca1dc33 100644 --- a/src/mesa/main/shared_options.c +++ b/src/mesa/main/shared_options.c @@ -32,6 +32,9 @@ _mesa_shared_options_fill(struct driOptionCache *optionCache, sharedOptions->AllowGLSLExtensionDirectiveMidShader = driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader"); + sharedOptions->DisableGLSLLineContinuations = + driQueryOptionb(optionCache, "disable_glsl_line_continuations"); + sharedOptions->ForceGLSLExtensionsWarn = driQueryOptionb(optionCache, "force_glsl_extensions_warn"); diff --git a/src/mesa/main/shared_options.h b/src/mesa/main/shared_options.h index d86561f..aab159d 100644 --- a/src/mesa/main/shared_options.h +++ b/src/mesa/main/shared_options.h @@ -54,6 +54,12 @@ struct shared_options GLboolean AllowGLSLExtensionDirectiveMidShader; /** + * Disable interpretation of line continuations (lines ending with a + * backslash character ('\') in GLSL source. + */ + GLboolean DisableGLSLLineContinuations; + + /** * Changes default GLSL extension behavior from "error" to "warn". It's out * of spec, but it can make some apps work that otherwise wouldn't. */ @@ -78,6 +84,7 @@ static inline void _mesa_shared_options_fill_defaults(struct shared_options *sharedOptions) { sharedOptions->AllowGLSLExtensionDirectiveMidShader = GL_FALSE; + sharedOptions->DisableGLSLLineContinuations = GL_FALSE; sharedOptions->ForceGLSLExtensionsWarn = GL_FALSE; sharedOptions->ForceGLSLVersion = 0; } diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 5ac3e4e..f91eb2e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -808,9 +808,6 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_transform_feedback_instanced = GL_TRUE; } - if (options->disable_glsl_line_continuations) - consts->DisableGLSLLineContinuations = 1; - consts->MinMapBufferAlignment = screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT); -- 2.4.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev