st/mesa: create framebuffer iface hash table per st manager
authorCharmaine Lee <charmainel@vmware.com>
Sat, 22 Jul 2017 04:41:06 +0000 (21:41 -0700)
committerCharmaine Lee <charmainel@vmware.com>
Mon, 24 Jul 2017 21:03:28 +0000 (14:03 -0700)
commitbbc29393d3beaf6344c7188547b4ff61b63946ae
tree9369b57a09847b034693409637bda46add4bcad6
parentca82ef5ac75e50abb109986b55002cca24f7c0fb
st/mesa: create framebuffer iface hash table per st manager

With commit 5124bf98239, a framebuffer interface hash table is
created in st_gl_api_create(), which is called in
dri_init_screen_helper() for each screen. When the hash table is
overwritten with multiple calls to st_gl_api_create(), it can cause
race condition. This patch fixes the problem by creating a
framebuffer interface hash table per state tracker manager.

Fixes crash with steam.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101876
Fixes: 5124bf98239 ("st/mesa: add destroy_drawable interface")
Tested-by: Christoph Haag <haagch@frickel.club>
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/dri/dri_screen.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_device.c
src/gallium/state_trackers/wgl/stw_st.c
src/mesa/state_tracker/st_manager.c