summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_drawable.c1
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c3
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c3
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_st.c1
-rw-r--r--src/gallium/state_trackers/wgl/stw_device.c3
-rw-r--r--src/gallium/state_trackers/wgl/stw_st.c1
6 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index c7df0f63327..9e0dd6bcfb3 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -158,6 +158,7 @@ dri_create_buffer(__DRIscreen * sPriv,
dPriv->driverPrivate = (void *)drawable;
p_atomic_set(&drawable->base.stamp, 1);
drawable->base.ID = p_atomic_inc_return(&drifb_ID);
+ drawable->base.state_manager = &screen->base;
return GL_TRUE;
fail:
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index 1dd7bd3ec12..59a850b1423 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -457,6 +457,9 @@ dri_destroy_option_cache(struct dri_screen * screen)
void
dri_destroy_screen_helper(struct dri_screen * screen)
{
+ if (screen->base.destroy)
+ screen->base.destroy(&screen->base);
+
if (screen->st_api && screen->st_api->destroy)
screen->st_api->destroy(screen->st_api);
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index e4b1e9dd4de..828253bdb19 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -181,6 +181,9 @@ xmesa_close_display(Display *display)
* xmdpy->screen->destroy(xmdpy->screen);
* }
*/
+
+ if (xmdpy->smapi->destroy)
+ xmdpy->smapi->destroy(xmdpy->smapi);
free(xmdpy->smapi);
XFree((char *) info);
diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c
index 6a0f4aad7d8..0c42e653c76 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_st.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_st.c
@@ -304,6 +304,7 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
stfbi->flush_front = xmesa_st_framebuffer_flush_front;
stfbi->validate = xmesa_st_framebuffer_validate;
stfbi->ID = p_atomic_inc_return(&xmesa_stfbi_ID);
+ stfbi->state_manager = xmdpy->smapi;
p_atomic_set(&stfbi->stamp, 1);
stfbi->st_manager_private = (void *) xstfb;
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index 6c0f14d4f36..b88e1100ebb 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -199,6 +199,9 @@ stw_cleanup(void)
DeleteCriticalSection(&stw_dev->fb_mutex);
DeleteCriticalSection(&stw_dev->ctx_mutex);
+ if (stw_dev->smapi->destroy)
+ stw_dev->smapi->destroy(stw_dev->smapi);
+
FREE(stw_dev->smapi);
stw_dev->stapi->destroy(stw_dev->stapi);
diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c
index 85a8b1743ea..5e165c89f56 100644
--- a/src/gallium/state_trackers/wgl/stw_st.c
+++ b/src/gallium/state_trackers/wgl/stw_st.c
@@ -235,6 +235,7 @@ stw_st_create_framebuffer(struct stw_framebuffer *fb)
stwfb->fb = fb;
stwfb->stvis = fb->pfi->stvis;
stwfb->base.ID = p_atomic_inc_return(&stwfb_ID);
+ stwfb->base.state_manager = stw_dev->smapi;
stwfb->base.visual = &stwfb->stvis;
p_atomic_set(&stwfb->base.stamp, 1);