st/dri: remove driOptionCache from dri_context in favor of dri_screen
authorMarek Olšák <marek.olsak@amd.com>
Tue, 30 Jul 2013 20:29:21 +0000 (22:29 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 30 Jul 2013 21:31:24 +0000 (23:31 +0200)
There is no reason to have this duplicated.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/dri/common/dri_context.c
src/gallium/state_trackers/dri/common/dri_context.h

index 66034915447501d8238b022e9d11f8bbbdfed232..b5445f87914c068692f4f434cfa8c92c7b5f376e 100644 (file)
@@ -109,11 +109,7 @@ dri_create_context(gl_api api, const struct gl_config * visual,
    ctx->cPriv = cPriv;
    ctx->sPriv = sPriv;
 
-   driParseConfigFiles(&ctx->optionCache,
-                      &screen->optionCacheDefaults,
-                       sPriv->myNum, driver_descriptor.name);
-
-   dri_fill_st_options(&attribs.options, &ctx->optionCache);
+   dri_fill_st_options(&attribs.options, &screen->optionCache);
    dri_fill_st_visual(&attribs.visual, screen, visual);
    ctx->st = stapi->create_context(stapi, &screen->base, &attribs, &ctx_err,
                                   st_share);
@@ -171,12 +167,6 @@ dri_destroy_context(__DRIcontext * cPriv)
       hud_destroy(ctx->hud);
    }
 
-   /* note: we are freeing values and nothing more because
-    * driParseConfigFiles allocated values only - the rest
-    * is owned by screen optionCacheDefaults.
-    */
-   free(ctx->optionCache.values);
-
    /* No particular reason to wait for command completion before
     * destroying a context, but we flush the context here
     * to avoid having to add code elsewhere to cope with flushing a
index 2734ee50daa4dd3dc4a65b50919468a5a579da05..b87ce40b11e57a739442050efd87ffe1f3cf443f 100644 (file)
@@ -50,8 +50,6 @@ struct dri_context
    __DRIdrawable *dPriv;
    __DRIdrawable *rPriv;
 
-   driOptionCache optionCache;
-
    unsigned int bind_count;
 
    /* gallium */