diff options
author | Charmaine Lee <[email protected]> | 2017-07-21 21:41:06 -0700 |
---|---|---|
committer | Charmaine Lee <[email protected]> | 2017-07-24 14:03:28 -0700 |
commit | bbc29393d3beaf6344c7188547b4ff61b63946ae (patch) | |
tree | 9369b57a09847b034693409637bda46add4bcad6 /src/gallium/state_trackers/wgl | |
parent | ca82ef5ac75e50abb109986b55002cca24f7c0fb (diff) |
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 <[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_device.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_st.c | 1 |
2 files changed, 4 insertions, 0 deletions
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); |