st/dri: pass config options to the state tracker
authorVadim Girlin <vadimgirlin@gmail.com>
Thu, 12 Apr 2012 00:30:57 +0000 (04:30 +0400)
committerVadim Girlin <vadimgirlin@gmail.com>
Thu, 23 Aug 2012 15:57:51 +0000 (19:57 +0400)
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
src/gallium/state_trackers/dri/common/dri_context.c

index 9e59023d32580d07fa023d3c43a5adec654ecbc7..040382698b1b76c3d9ca8c6582b180d00c3dd4e0 100644 (file)
@@ -49,6 +49,13 @@ dri_pp_query(struct dri_context *ctx)
    }
 }
 
+static void dri_fill_st_options(struct st_config_options *options,
+                                const struct driOptionCache * optionCache)
+{
+   options->force_glsl_extensions_warn =
+      driQueryOptionb(optionCache, "force_glsl_extensions_warn");
+}
+
 GLboolean
 dri_create_context(gl_api api, const struct gl_config * visual,
                   __DRIcontext * cPriv,
@@ -107,6 +114,7 @@ dri_create_context(gl_api api, const struct gl_config * visual,
    driParseConfigFiles(&ctx->optionCache,
                       &screen->optionCache, sPriv->myNum, driver_descriptor.name);
 
+   dri_fill_st_options(&attribs.options, &ctx->optionCache);
    dri_fill_st_visual(&attribs.visual, screen, visual);
    ctx->st = stapi->create_context(stapi, &screen->base, &attribs, &ctx_err,
                                   st_share);