summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 8122b61919e..98d93af749e 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -334,8 +334,6 @@ static void si_destroy_context(struct pipe_context *context)
si_resource_reference(&sctx->eop_bug_scratch, NULL);
si_resource_reference(&sctx->eop_bug_scratch_tmz, NULL);
si_resource_reference(&sctx->shadowed_regs, NULL);
- radeon_bo_reference(sctx->screen->ws, &sctx->gds, NULL);
- radeon_bo_reference(sctx->screen->ws, &sctx->gds_oa, NULL);
si_destroy_compiler(&sctx->compiler);
@@ -969,6 +967,10 @@ static void si_destroy_screen(struct pipe_screen *pscreen)
si_gpu_load_kill_thread(sscreen);
simple_mtx_destroy(&sscreen->gpu_load_mutex);
+ simple_mtx_destroy(&sscreen->gds_mutex);
+
+ radeon_bo_reference(sscreen->ws, &sscreen->gds, NULL);
+ radeon_bo_reference(sscreen->ws, &sscreen->gds_oa, NULL);
slab_destroy_parent(&sscreen->pool_transfers);
@@ -1188,6 +1190,7 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
(void)simple_mtx_init(&sscreen->aux_context_lock, mtx_plain);
(void)simple_mtx_init(&sscreen->async_compute_context_lock, mtx_plain);
(void)simple_mtx_init(&sscreen->gpu_load_mutex, mtx_plain);
+ (void)simple_mtx_init(&sscreen->gds_mutex, mtx_plain);
si_init_gs_info(sscreen);
if (!si_init_shader_cache(sscreen)) {