On Wed, 2012-08-22 at 11:23 +0300, Maxim Levitsky wrote: > Currently Gallium has no way to activate the > 'force_glsl_extensions_warn' workaround that allows > buggy apps that use GLSL extensions without asking for them to work. > > Since gallium mesa state tracker is essentially split into two, > (dri (src/gallium/state_trackers/dri) and mesa (src/mesa/state_tracker)) > and only former has access to driconf options while later knows nothing > about dri, I added this support by reading an environment variable. > > export force_glsl_extensions_warn=true >
I just remembered that I sent some patches for passing the driconf options to the state tracker but then forgot about them completely. Feel free to reuse anything from that series if it might help: http://lists.freedesktop.org/archives/mesa-dev/2012-April/020729.html Vadim > > Signed-off-by: Maxim Levitsky <maximlevit...@gmail.com> > --- > src/mesa/state_tracker/st_context.c | 9 +++++++++ > src/mesa/state_tracker/st_context.h | 3 +++ > 2 files changed, 12 insertions(+) > > diff --git a/src/mesa/state_tracker/st_context.c > b/src/mesa/state_tracker/st_context.c > index 2e14da2..b5786b9 100644 > --- a/src/mesa/state_tracker/st_context.c > +++ b/src/mesa/state_tracker/st_context.c > @@ -110,6 +110,13 @@ st_get_msaa(void) > return 0; > } > > +bool > +st_get_glsl_warn(void) > +{ > + const char *env = _mesa_getenv("force_glsl_extensions_warn"); > + return env && !strcmp(env, "true"); > +} > + > > > > @@ -193,6 +200,8 @@ st_create_context_priv( struct gl_context *ctx, struct > pipe_context *pipe ) > st->has_stencil_export = > screen->get_param(screen, PIPE_CAP_SHADER_STENCIL_EXPORT); > > + st->ctx->Const.ForceGLSLExtensionsWarn = st_get_glsl_warn(); > + > /* GL limits and extensions */ > st_init_limits(st); > st_init_extensions(st); > diff --git a/src/mesa/state_tracker/st_context.h > b/src/mesa/state_tracker/st_context.h > index 47d3af5..67accd3 100644 > --- a/src/mesa/state_tracker/st_context.h > +++ b/src/mesa/state_tracker/st_context.h > @@ -263,6 +263,9 @@ st_fb_orientation(const struct gl_framebuffer *fb) > extern int > st_get_msaa(void); > > +extern bool > +st_get_glsl_warn(void); > + > extern struct st_context * > st_create_context(gl_api api, struct pipe_context *pipe, > const struct gl_config *visual, _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev