st/mesa: add destroy_drawable interface
authorCharmaine Lee <charmainel@vmware.com>
Thu, 20 Jul 2017 18:04:14 +0000 (11:04 -0700)
committerCharmaine Lee <charmainel@vmware.com>
Fri, 21 Jul 2017 00:34:34 +0000 (17:34 -0700)
commit5124bf982393114862f44ee62fa361027faa7c29
treeccf369ce57ec78bd9cb214d3584383caf8c6a035
parent59a141c95a7f4008ba5d5d7804fa75e6b8604a06
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 <brad.king@kitware.com>
Tested-by: Gert Wollny <gw.fossdev@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/include/state_tracker/st_api.h
src/gallium/state_trackers/dri/dri_drawable.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/glx/xlib/xm_st.c
src/gallium/state_trackers/wgl/stw_st.c
src/mesa/state_tracker/st_manager.c
src/mesa/state_tracker/st_manager.h