aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/dri_screen.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-01-22 12:17:02 -0700
committerBrian Paul <[email protected]>2010-01-22 12:17:02 -0700
commitcd8614b0287dc5a69725ec4ee0208fad61f7789e (patch)
tree3ee089b8384e7a60c5c3a3cc87f2a633bd724bbe /src/gallium/state_trackers/dri/dri_screen.c
parent2b20b604277e3cdf7afb2431b50dbb05da12ff1c (diff)
parent64871747bb7b611ffe429fbf1724bd98ee25dd84 (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_screen.c')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index d8c054313b3..cdc8eb1b122 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -292,6 +292,8 @@ dri_init_screen2(__DRIscreen * sPriv)
{
struct dri_screen *screen;
struct drm_create_screen_arg arg;
+ const __DRIdri2LoaderExtension *dri2_ext =
+ sPriv->dri2.loader;
screen = CALLOC_STRUCT(dri_screen);
if (!screen)
@@ -317,6 +319,9 @@ dri_init_screen2(__DRIscreen * sPriv)
driParseOptionInfo(&screen->optionCache,
__driConfigOptions, __driNConfigOptions);
+ screen->auto_fake_front = dri2_ext->base.version >= 3 &&
+ dri2_ext->getBuffersWithFormat != NULL;
+
return dri_fill_in_modes(screen, 32);
fail:
return NULL;
@@ -326,8 +331,18 @@ static void
dri_destroy_screen(__DRIscreen * sPriv)
{
struct dri_screen *screen = dri_screen(sPriv);
+ int i;
screen->pipe_screen->destroy(screen->pipe_screen);
+
+ for (i = 0; i < (1 << screen->optionCache.tableSize); ++i) {
+ FREE(screen->optionCache.info[i].name);
+ FREE(screen->optionCache.info[i].ranges);
+ }
+
+ FREE(screen->optionCache.info);
+ FREE(screen->optionCache.values);
+
FREE(screen);
sPriv->private = NULL;
}