This has the side effect of enabling this option for 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/glsl_parser_extras.cpp | 2 +- src/mesa/drivers/dri/common/xmlpool.h | 2 +- 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 | 2 -- 12 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index eca3d50..b8cd330 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -247,7 +247,6 @@ struct st_config_options boolean disable_blend_func_extended; boolean disable_glsl_line_continuations; boolean disable_shader_bit_encoding; - boolean force_glsl_extensions_warn; unsigned force_glsl_version; boolean force_s3tc_enable; boolean allow_glsl_extension_directive_midshader; diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 74efae7..6fb7155 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_FORCE_GLSL_EXTENSIONS_WARN("false") DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") DRI_CONF_DISABLE_SHADER_BIT_ENCODING("false") @@ -99,8 +98,6 @@ dri_fill_st_options(struct st_config_options *options, driQueryOptionb(optionCache, "disable_glsl_line_continuations"); options->disable_shader_bit_encoding = driQueryOptionb(optionCache, "disable_shader_bit_encoding"); - options->force_glsl_extensions_warn = - driQueryOptionb(optionCache, "force_glsl_extensions_warn"); options->force_glsl_version = driQueryOptioni(optionCache, "force_glsl_version"); options->force_s3tc_enable = diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c index e4cc149..2c32fa2 100644 --- a/src/gallium/state_trackers/osmesa/osmesa.c +++ b/src/gallium/state_trackers/osmesa/osmesa.c @@ -585,7 +585,6 @@ OSMesaCreateContextExt(GLenum format, GLint depthBits, GLint stencilBits, attribs.major = 2; attribs.minor = 1; attribs.flags = 0; /* ST_CONTEXT_FLAG_x */ - attribs.options.force_glsl_extensions_warn = FALSE; attribs.options.disable_blend_func_extended = FALSE; attribs.options.disable_glsl_line_continuations = FALSE; attribs.options.disable_shader_bit_encoding = FALSE; diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 046d5d7..49b715c 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -210,7 +210,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, this->supported_version_string = supported; - if (ctx->Const.ForceGLSLExtensionsWarn) + if (ctx->Const.options.ForceGLSLExtensionsWarn) _mesa_glsl_process_extension("all", NULL, "warn", NULL, this); this->default_uniform_qualifier = new(this) ast_type_qualifier(); diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/mesa/drivers/dri/common/xmlpool.h index 010eee9..91f810f 100644 --- a/src/mesa/drivers/dri/common/xmlpool.h +++ b/src/mesa/drivers/dri/common/xmlpool.h @@ -109,7 +109,7 @@ "<!-- No shared quality options yet -->\n" #define DRI_CONF_SECTION_DEBUG_SHARED \ - "<!-- No shared debug options yet -->\n" + DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("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 a96020f..0098840 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_FORCE_GLSL_EXTENSIONS_WARN("false") DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 1086c9b..ef05efd 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -684,9 +684,6 @@ brw_process_driconf_options(struct brw_context *brw) brw->precompile = driQueryOptionb(&brw->optionCache, "shader_precompile"); - ctx->Const.ForceGLSLExtensionsWarn = - driQueryOptionb(options, "force_glsl_extensions_warn"); - ctx->Const.DisableGLSLLineContinuations = driQueryOptionb(options, "disable_glsl_line_continuations"); diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index a99761a..d52bdf3 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_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") diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index dd75b1c..619788b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3381,12 +3381,6 @@ struct gl_constants struct shared_options options; /** - * 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. - */ - GLboolean ForceGLSLExtensionsWarn; - - /** * If non-zero, forces GLSL shaders to behave as if they began * with "#version ForceGLSLVersion". */ diff --git a/src/mesa/main/shared_options.c b/src/mesa/main/shared_options.c index d3b843c..8457b18 100644 --- a/src/mesa/main/shared_options.c +++ b/src/mesa/main/shared_options.c @@ -29,5 +29,6 @@ void _mesa_shared_options_fill(struct driOptionCache *optionCache, struct shared_options *sharedOptions) { - + 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 abfb0a8..7cee737 100644 --- a/src/mesa/main/shared_options.h +++ b/src/mesa/main/shared_options.h @@ -48,6 +48,11 @@ struct shared_options /* quality */ /* debug */ + /** + * 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. + */ + GLboolean ForceGLSLExtensionsWarn; /* misc */ }; @@ -61,7 +66,7 @@ _mesa_shared_options_fill(struct driOptionCache *optionCache, static inline void _mesa_shared_options_fill_defaults(struct shared_options *sharedOptions) { - + sharedOptions->ForceGLSLExtensionsWarn = GL_FALSE; } #ifdef __cplusplus diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index b1057f3..b68ff6e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -811,8 +811,6 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_draw_instanced) { extensions->ARB_transform_feedback_instanced = GL_TRUE; } - if (options->force_glsl_extensions_warn) - consts->ForceGLSLExtensionsWarn = 1; if (options->disable_glsl_line_continuations) consts->DisableGLSLLineContinuations = 1; -- 2.4.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev