aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-07-21 21:41:06 -0700
committerCharmaine Lee <[email protected]>2017-07-24 14:03:28 -0700
commitbbc29393d3beaf6344c7188547b4ff61b63946ae (patch)
tree9369b57a09847b034693409637bda46add4bcad6 /src/gallium/include
parentca82ef5ac75e50abb109986b55002cca24f7c0fb (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/include')
-rw-r--r--src/gallium/include/state_tracker/st_api.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 9b660f74c93..bc62a69da37 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
@@ -284,6 +284,7 @@ struct st_context_attribs
};
struct st_context_iface;
+struct st_manager;
/**
* Represent a windowing system drawable.
@@ -317,6 +318,11 @@ struct st_framebuffer_iface
uint32_t ID;
/**
+ * The state tracker manager that manages this object.
+ */
+ struct st_manager *state_manager;
+
+ /**
* Available for the state tracker manager to use.
*/
void *st_manager_private;
@@ -376,6 +382,11 @@ struct st_context_iface
void *st_manager_private;
/**
+ * The state tracker manager that manages this object.
+ */
+ struct st_manager *state_manager;
+
+ /**
* The CSO context associated with this context in case we need to draw
* something before swap buffers.
*/
@@ -483,6 +494,16 @@ struct st_manager
*/
void (*set_background_context)(struct st_context_iface *stctxi,
struct util_queue_monitoring *queue_info);
+
+ /**
+ * Destroy any private data used by the state tracker manager.
+ */
+ void (*destroy)(struct st_manager *smapi);
+
+ /**
+ * Available for the state tracker manager to use.
+ */
+ void *st_manager_private;
};
/**