summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c3
-rw-r--r--src/gallium/drivers/svga/svga_screen.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index 7808903083b..271d0787abb 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -320,6 +320,9 @@ svga_buffer_transfer_unmap( struct pipe_context *pipe,
}
if (svga_buffer_has_hw_storage(sbuf)) {
+ /* Note: we may wind up flushing here and unmapping other buffers
+ * which leads to recursively locking ss->swc_mutex.
+ */
svga_buffer_hw_storage_unmap(svga, sbuf);
}
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 95132fbeb82..74e5485c0ef 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -1157,7 +1157,7 @@ svga_screen_create(struct svga_winsys_screen *sws)
}
(void) mtx_init(&svgascreen->tex_mutex, mtx_plain);
- (void) mtx_init(&svgascreen->swc_mutex, mtx_plain);
+ (void) mtx_init(&svgascreen->swc_mutex, mtx_recursive);
svga_screen_cache_init(svgascreen);