aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/os/os_thread.h7
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c4
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_cache.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_slab.c2
-rw-r--r--src/gallium/auxiliary/util/u_queue.c6
-rw-r--r--src/gallium/auxiliary/util/u_range.h2
-rw-r--r--src/gallium/auxiliary/util/u_ringbuffer.c2
-rw-r--r--src/gallium/drivers/ddebug/dd_context.c4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c2
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_surface.c2
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_surface.c2
-rw-r--r--src/gallium/drivers/r300/r300_screen.c2
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c4
-rw-r--r--src/gallium/drivers/svga/svga_screen.c4
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c2
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c2
-rw-r--r--src/gallium/state_trackers/nine/nine_queue.c4
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c2
-rw-r--r--src/gallium/state_trackers/va/context.c2
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c2
-rw-r--r--src/gallium/state_trackers/vdpau/device.c2
-rw-r--r--src/gallium/targets/haiku-softpipe/GalliumContext.cpp2
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c4
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c10
-rw-r--r--src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c2
-rw-r--r--src/gallium/winsys/svga/drm/vmw_surface.c2
-rw-r--r--src/gallium/winsys/virgl/drm/virgl_drm_winsys.c4
-rw-r--r--src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c2
35 files changed, 50 insertions, 53 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index cccb5315579..571e3c68dae 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -108,9 +108,6 @@ static inline int pipe_thread_is_self( pipe_thread thread )
return 0;
}
-#define pipe_mutex_destroy(mutex) \
- mtx_destroy(&(mutex))
-
#define pipe_mutex_lock(mutex) \
(void) mtx_lock(&(mutex))
@@ -185,7 +182,7 @@ static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
static inline void pipe_barrier_destroy(pipe_barrier *barrier)
{
assert(barrier->waiters == 0);
- pipe_mutex_destroy(barrier->mutex);
+ mtx_destroy(&barrier->mutex);
cnd_destroy(&barrier->condvar);
}
@@ -238,7 +235,7 @@ pipe_semaphore_init(pipe_semaphore *sema, int init_val)
static inline void
pipe_semaphore_destroy(pipe_semaphore *sema)
{
- pipe_mutex_destroy(sema->mutex);
+ mtx_destroy(&sema->mutex);
cnd_destroy(&sema->cond);
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index fefdcefaf53..b3b78284b4a 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -992,7 +992,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
#endif
pipe_mutex_unlock(fenced_mgr->mutex);
- pipe_mutex_destroy(fenced_mgr->mutex);
+ mtx_destroy(&fenced_mgr->mutex);
if (fenced_mgr->provider)
fenced_mgr->provider->destroy(fenced_mgr->provider);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index f614abfc2e8..33f068e13fb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -240,7 +240,7 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
LIST_DEL(&buf->head);
pipe_mutex_unlock(mgr->mutex);
- pipe_mutex_destroy(buf->mutex);
+ mtx_destroy(&buf->mutex);
pb_reference(&buf->buffer, NULL);
FREE(buf);
@@ -449,7 +449,7 @@ pb_debug_manager_destroy(struct pb_manager *_mgr)
}
pipe_mutex_unlock(mgr->mutex);
- pipe_mutex_destroy(mgr->mutex);
+ mtx_destroy(&mgr->mutex);
mgr->provider->destroy(mgr->provider);
FREE(mgr);
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.c b/src/gallium/auxiliary/pipebuffer/pb_cache.c
index 422318c599b..adae22270aa 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_cache.c
@@ -298,5 +298,5 @@ void
pb_cache_deinit(struct pb_cache *mgr)
{
pb_cache_release_all_buffers(mgr);
- pipe_mutex_destroy(mgr->mutex);
+ mtx_destroy(&mgr->mutex);
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c
index 6f6664f4297..9ad88db257c 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c
@@ -248,5 +248,5 @@ pb_slabs_deinit(struct pb_slabs *slabs)
}
FREE(slabs->groups);
- pipe_mutex_destroy(slabs->mutex);
+ mtx_destroy(&slabs->mutex);
}
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index 56a9fa8cf32..092f91af3c5 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -123,7 +123,7 @@ util_queue_fence_destroy(struct util_queue_fence *fence)
{
assert(fence->signalled);
cnd_destroy(&fence->cond);
- pipe_mutex_destroy(fence->mutex);
+ mtx_destroy(&fence->mutex);
}
/****************************************************************************
@@ -251,7 +251,7 @@ fail:
if (queue->jobs) {
cnd_destroy(&queue->has_space_cond);
cnd_destroy(&queue->has_queued_cond);
- pipe_mutex_destroy(queue->lock);
+ mtx_destroy(&queue->lock);
FREE(queue->jobs);
}
/* also util_queue_is_initialized can be used to check for success */
@@ -283,7 +283,7 @@ util_queue_destroy(struct util_queue *queue)
cnd_destroy(&queue->has_space_cond);
cnd_destroy(&queue->has_queued_cond);
- pipe_mutex_destroy(queue->lock);
+ mtx_destroy(&queue->lock);
FREE(queue->jobs);
FREE(queue->threads);
}
diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h
index 24c78ba662e..d4a4ae1575d 100644
--- a/src/gallium/auxiliary/util/u_range.h
+++ b/src/gallium/auxiliary/util/u_range.h
@@ -85,7 +85,7 @@ util_range_init(struct util_range *range)
static inline void
util_range_destroy(struct util_range *range)
{
- pipe_mutex_destroy(range->write_mutex);
+ mtx_destroy(&range->write_mutex);
}
#endif
diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c
index fce113314ae..c13517aa547 100644
--- a/src/gallium/auxiliary/util/u_ringbuffer.c
+++ b/src/gallium/auxiliary/util/u_ringbuffer.c
@@ -48,7 +48,7 @@ fail:
void util_ringbuffer_destroy( struct util_ringbuffer *ring )
{
cnd_destroy(&ring->change);
- pipe_mutex_destroy(ring->mutex);
+ mtx_destroy(&ring->mutex);
FREE(ring->buf);
FREE(ring);
}
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 1ce4a3b576e..550f7641cc2 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -598,7 +598,7 @@ dd_context_destroy(struct pipe_context *_pipe)
dctx->kill_thread = 1;
pipe_mutex_unlock(dctx->mutex);
pipe_thread_wait(dctx->thread);
- pipe_mutex_destroy(dctx->mutex);
+ mtx_destroy(&dctx->mutex);
assert(!dctx->records);
}
@@ -873,7 +873,7 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
(void) mtx_init(&dctx->mutex, mtx_plain);
dctx->thread = pipe_thread_create(dd_thread_pipelined_hang_detect, dctx);
if (!dctx->thread) {
- pipe_mutex_destroy(dctx->mutex);
+ mtx_destroy(&dctx->mutex);
goto fail;
}
}
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 3f43b8d9d86..4a461fd511c 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -142,7 +142,7 @@ fd_screen_destroy(struct pipe_screen *pscreen)
slab_destroy_parent(&screen->transfer_pool);
- pipe_mutex_destroy(screen->lock);
+ mtx_destroy(&screen->lock);
free(screen);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c
index 04c148395e3..ec26bfe9532 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.c
+++ b/src/gallium/drivers/llvmpipe/lp_fence.c
@@ -72,7 +72,7 @@ lp_fence_destroy(struct lp_fence *fence)
if (LP_DEBUG & DEBUG_FENCE)
debug_printf("%s %d\n", __FUNCTION__, fence->id);
- pipe_mutex_destroy(fence->mutex);
+ mtx_destroy(&fence->mutex);
cnd_destroy(&fence->signalled);
FREE(fence);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 0d619eff3ff..66dd1d23257 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -90,7 +90,7 @@ void
lp_scene_destroy(struct lp_scene *scene)
{
lp_fence_reference(&scene->fence, NULL);
- pipe_mutex_destroy(scene->mutex);
+ mtx_destroy(&scene->mutex);
assert(scene->data.head->next == NULL);
FREE(scene->data.head);
FREE(scene);
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index f5f7e7178da..4bc202c497e 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -561,7 +561,7 @@ llvmpipe_destroy_screen( struct pipe_screen *_screen )
if(winsys->destroy)
winsys->destroy(winsys);
- pipe_mutex_destroy(screen->rast_mutex);
+ mtx_destroy(&screen->rast_mutex);
FREE(screen);
}
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index 5635e9fe557..46cd2e61f9d 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -1780,7 +1780,7 @@ nv50_blitter_destroy(struct nv50_screen *screen)
}
}
- pipe_mutex_destroy(blitter->mutex);
+ mtx_destroy(&blitter->mutex);
FREE(blitter);
}
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index 5720937c090..1e91fa8b6ee 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -1689,7 +1689,7 @@ nvc0_blitter_destroy(struct nvc0_screen *screen)
}
}
- pipe_mutex_destroy(blitter->mutex);
+ mtx_destroy(&blitter->mutex);
FREE(blitter);
}
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 392b0bb6a8a..9a2400df935 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -684,7 +684,7 @@ static void r300_destroy_screen(struct pipe_screen* pscreen)
if (rws && !rws->unref(rws))
return;
- pipe_mutex_destroy(r300screen->cmask_mutex);
+ mtx_destroy(&r300screen->cmask_mutex);
slab_destroy_parent(&r300screen->pool_transfers);
if (rws)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 96b95ab09b6..0020686e58b 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1360,8 +1360,8 @@ void r600_destroy_common_screen(struct r600_common_screen *rscreen)
r600_perfcounters_destroy(rscreen);
r600_gpu_load_kill_thread(rscreen);
- pipe_mutex_destroy(rscreen->gpu_load_mutex);
- pipe_mutex_destroy(rscreen->aux_context_lock);
+ mtx_destroy(&rscreen->gpu_load_mutex);
+ mtx_destroy(&rscreen->aux_context_lock);
rscreen->aux_context->destroy(rscreen->aux_context);
slab_destroy_parent(&rscreen->pool_transfers);
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 723975aa01c..1550326f8ed 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -704,7 +704,7 @@ static void si_destroy_screen(struct pipe_screen* pscreen)
FREE(part);
}
}
- pipe_mutex_destroy(sscreen->shader_parts_mutex);
+ mtx_destroy(&sscreen->shader_parts_mutex);
si_destroy_shader_cache(sscreen);
r600_destroy_common_screen(&sscreen->b);
}
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 20410cebdae..c370f151dec 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -313,7 +313,7 @@ void si_destroy_shader_cache(struct si_screen *sscreen)
if (sscreen->shader_cache)
_mesa_hash_table_destroy(sscreen->shader_cache,
si_destroy_shader_cache_entry);
- pipe_mutex_destroy(sscreen->shader_cache_mutex);
+ mtx_destroy(&sscreen->shader_cache_mutex);
}
/* SHADER STATES */
@@ -1960,7 +1960,7 @@ static void si_delete_shader_selector(struct pipe_context *ctx, void *state)
si_delete_shader(sctx, sel->gs_copy_shader);
util_queue_fence_destroy(&sel->ready);
- pipe_mutex_destroy(sel->mutex);
+ mtx_destroy(&sel->mutex);
free(sel->tokens);
free(sel);
}
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 479b6fc522f..72c142d6cf8 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -919,8 +919,8 @@ svga_destroy_screen( struct pipe_screen *screen )
svga_screen_cache_cleanup(svgascreen);
- pipe_mutex_destroy(svgascreen->swc_mutex);
- pipe_mutex_destroy(svgascreen->tex_mutex);
+ mtx_destroy(&svgascreen->swc_mutex);
+ mtx_destroy(&svgascreen->tex_mutex);
svgascreen->sws->destroy(svgascreen->sws);
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 514fc00afa4..c14996de892 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -396,7 +396,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen)
sws->fence_reference(sws, &cache->entries[i].fence, NULL);
}
- pipe_mutex_destroy(cache->mutex);
+ mtx_destroy(&cache->mutex);
}
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index da0e4149cea..9b37dff6778 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -404,7 +404,7 @@ dri_destroy_screen_helper(struct dri_screen * screen)
screen->base.screen->destroy(screen->base.screen);
dri_destroy_option_cache(screen);
- pipe_mutex_destroy(screen->opencl_func_mutex);
+ mtx_destroy(&screen->opencl_func_mutex);
}
void
diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c
index 30b0e303c0f..07dfee58188 100644
--- a/src/gallium/state_trackers/nine/nine_queue.c
+++ b/src/gallium/state_trackers/nine/nine_queue.c
@@ -265,8 +265,8 @@ void
nine_queue_delete(struct nine_queue_pool *ctx)
{
unsigned i;
- pipe_mutex_destroy(ctx->mutex_pop);
- pipe_mutex_destroy(ctx->mutex_push);
+ mtx_destroy(&ctx->mutex_pop);
+ mtx_destroy(&ctx->mutex_push);
for (i = 0; i < NINE_CMD_BUFS; i++)
FREE(ctx->pool[i].mem_pool);
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index a331f7ca8d6..978fa013c49 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -233,7 +233,7 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
nine_csmt_wait_processed(ctx);
nine_queue_delete(ctx->pool);
- pipe_mutex_destroy(ctx->mutex_processed);
+ mtx_destroy(&ctx->mutex_processed);
FREE(ctx);
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index 84bb805d8fa..36e314fa2b7 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -351,7 +351,7 @@ vlVaTerminate(VADriverContextP ctx)
drv->pipe->destroy(drv->pipe);
drv->vscreen->destroy(drv->vscreen);
handle_table_destroy(drv->htab);
- pipe_mutex_destroy(drv->mutex);
+ mtx_destroy(&drv->mutex);
FREE(drv);
return VA_STATUS_SUCCESS;
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 628e5030c5a..387371b29ab 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -166,7 +166,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder)
pipe_mutex_lock(vldecoder->mutex);
vldecoder->decoder->destroy(vldecoder->decoder);
pipe_mutex_unlock(vldecoder->mutex);
- pipe_mutex_destroy(vldecoder->mutex);
+ mtx_destroy(&vldecoder->mutex);
vlRemoveDataHTAB(decoder);
DeviceReference(&vldecoder->device, NULL);
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 15652f08bf8..3ae3da3be1d 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -233,7 +233,7 @@ vlVdpDeviceDestroy(VdpDevice device)
void
vlVdpDeviceFree(vlVdpDevice *dev)
{
- pipe_mutex_destroy(dev->mutex);
+ mtx_destroy(&dev->mutex);
vl_compositor_cleanup(&dev->compositor);
pipe_sampler_view_reference(&dev->dummy_sv, NULL);
dev->context->destroy(dev->context);
diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
index df222f6580a..9662149bd5c 100644
--- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
+++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
@@ -69,7 +69,7 @@ GalliumContext::~GalliumContext()
DestroyContext(i);
Unlock();
- pipe_mutex_destroy(fMutex);
+ mtx_destroy(&fMutex);
// TODO: Destroy fScreen
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index f19c935f085..ae4e403ba43 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -389,10 +389,10 @@ static void amdgpu_winsys_destroy(struct radeon_winsys *rws)
if (util_queue_is_initialized(&ws->cs_queue))
util_queue_destroy(&ws->cs_queue);
- pipe_mutex_destroy(ws->bo_fence_lock);
+ mtx_destroy(&ws->bo_fence_lock);
pb_slabs_deinit(&ws->bo_slabs);
pb_cache_deinit(&ws->bo_cache);
- pipe_mutex_destroy(ws->global_bo_list_lock);
+ mtx_destroy(&ws->global_bo_list_lock);
do_winsys_deinit(ws);
FREE(rws);
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index e54dcaca679..786b1f61b10 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -370,7 +370,7 @@ void radeon_bo_destroy(struct pb_buffer *_buf)
args.handle = bo->handle;
drmIoctl(rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
- pipe_mutex_destroy(bo->u.real.map_mutex);
+ mtx_destroy(&bo->u.real.map_mutex);
if (bo->initial_domain & RADEON_DOMAIN_VRAM)
rws->allocated_vram -= align(bo->base.size, rws->info.gart_page_size);
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index abab4aab8d8..bbcf7a225f2 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -538,8 +538,8 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
if (util_queue_is_initialized(&ws->cs_queue))
util_queue_destroy(&ws->cs_queue);
- pipe_mutex_destroy(ws->hyperz_owner_mutex);
- pipe_mutex_destroy(ws->cmask_owner_mutex);
+ mtx_destroy(&ws->hyperz_owner_mutex);
+ mtx_destroy(&ws->cmask_owner_mutex);
if (ws->info.has_virtual_memory)
pb_slabs_deinit(&ws->bo_slabs);
@@ -552,9 +552,9 @@ static void radeon_winsys_destroy(struct radeon_winsys *rws)
util_hash_table_destroy(ws->bo_names);
util_hash_table_destroy(ws->bo_handles);
util_hash_table_destroy(ws->bo_vas);
- pipe_mutex_destroy(ws->bo_handles_mutex);
- pipe_mutex_destroy(ws->bo_va_mutex);
- pipe_mutex_destroy(ws->bo_fence_lock);
+ mtx_destroy(&ws->bo_handles_mutex);
+ mtx_destroy(&ws->bo_va_mutex);
+ mtx_destroy(&ws->bo_fence_lock);
if (ws->fd >= 0)
close(ws->fd);
diff --git a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
index 0553662380f..293fe7e032e 100644
--- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
+++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
@@ -809,7 +809,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr)
#endif
pipe_mutex_unlock(fenced_mgr->mutex);
- pipe_mutex_destroy(fenced_mgr->mutex);
+ mtx_destroy(&fenced_mgr->mutex);
FREE(fenced_mgr);
}
diff --git a/src/gallium/winsys/svga/drm/vmw_surface.c b/src/gallium/winsys/svga/drm/vmw_surface.c
index a438b1a7c5b..9fadbf95a02 100644
--- a/src/gallium/winsys/svga/drm/vmw_surface.c
+++ b/src/gallium/winsys/svga/drm/vmw_surface.c
@@ -201,7 +201,7 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
assert(p_atomic_read(&dst->validated) == 0);
dst->sid = SVGA3D_INVALID_ID;
#endif
- pipe_mutex_destroy(dst->mutex);
+ mtx_destroy(&dst->mutex);
FREE(dst);
}
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index b6a42343a5e..4f3fa4d810c 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -120,8 +120,8 @@ virgl_drm_winsys_destroy(struct virgl_winsys *qws)
util_hash_table_destroy(qdws->bo_handles);
util_hash_table_destroy(qdws->bo_names);
- pipe_mutex_destroy(qdws->bo_handles_mutex);
- pipe_mutex_destroy(qdws->mutex);
+ mtx_destroy(&qdws->bo_handles_mutex);
+ mtx_destroy(&qdws->mutex);
FREE(qdws);
}
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index a8c874a4f69..dde53e70794 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -619,7 +619,7 @@ virgl_vtest_winsys_destroy(struct virgl_winsys *vws)
virgl_cache_flush(vtws);
- pipe_mutex_destroy(vtws->mutex);
+ mtx_destroy(&vtws->mutex);
FREE(vtws);
}