diff options
author | Charmaine Lee <[email protected]> | 2017-07-20 11:04:14 -0700 |
---|---|---|
committer | Charmaine Lee <[email protected]> | 2017-07-20 17:34:34 -0700 |
commit | 5124bf982393114862f44ee62fa361027faa7c29 (patch) | |
tree | ccf369ce57ec78bd9cb214d3584383caf8c6a035 /src/gallium/state_trackers/wgl | |
parent | 59a141c95a7f4008ba5d5d7804fa75e6b8604a06 (diff) |
st/mesa: add destroy_drawable interface
With this patch, the st manager will maintain a hash table for
the active framebuffer interface objects. A destroy_drawable interface
is added to allow the state tracker to notify the st manager to remove
the associated framebuffer interface object from the hash table,
so the associated framebuffer and its resources can be deleted
at framebuffers purge time.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101829
Fixes: 147d7fb772a ("st/mesa: add a winsys buffers list in st_context")
Tested-by: Brad King <[email protected]>
Tested-by: Gert Wollny <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_st.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c index c2844b04c4e..85a8b1743ea 100644 --- a/src/gallium/state_trackers/wgl/stw_st.c +++ b/src/gallium/state_trackers/wgl/stw_st.c @@ -256,7 +256,11 @@ stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb) for (i = 0; i < ST_ATTACHMENT_COUNT; i++) pipe_resource_reference(&stwfb->textures[i], NULL); - stwfb->base.ID = 0; + /* Notify the st manager that the framebuffer interface is no + * longer valid. + */ + stw_dev->stapi->destroy_drawable(stw_dev->stapi, &stwfb->base); + FREE(stwfb); } |