aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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_bufmgr_mm.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c2
-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_debug_flush.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c2
-rw-r--r--src/gallium/auxiliary/util/u_queue.c4
-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.c2
-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/rbug/rbug_context.c6
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.c2
-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/drivers/vc4/vc4_screen.c2
-rw-r--r--src/gallium/state_trackers/dri/dri2.c2
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c2
-rw-r--r--src/gallium/state_trackers/nine/nine_queue.c4
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c6
-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.c6
-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_fence.c2
-rw-r--r--src/gallium/winsys/svga/drm/vmw_screen_svga.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
46 files changed, 65 insertions, 68 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index a6a9fea1f7e..cccb5315579 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_init(mutex) \
- (void) mtx_init(&(mutex), mtx_plain)
-
#define pipe_mutex_destroy(mutex) \
mtx_destroy(&(mutex))
@@ -181,7 +178,7 @@ static inline void pipe_barrier_init(pipe_barrier *barrier, unsigned count)
barrier->count = count;
barrier->waiters = 0;
barrier->sequence = 0;
- pipe_mutex_init(barrier->mutex);
+ (void) mtx_init(&barrier->mutex, mtx_plain);
cnd_init(&barrier->condvar);
}
@@ -233,7 +230,7 @@ typedef struct
static inline void
pipe_semaphore_init(pipe_semaphore *sema, int init_val)
{
- pipe_mutex_init(sema->mutex);
+ (void) mtx_init(&sema->mutex, mtx_plain);
cnd_init(&sema->cond);
sema->counter = init_val;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index f5e761b1e6b..fefdcefaf53 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -1033,7 +1033,7 @@ fenced_bufmgr_create(struct pb_manager *provider,
LIST_INITHEAD(&fenced_mgr->unfenced);
fenced_mgr->num_unfenced = 0;
- pipe_mutex_init(fenced_mgr->mutex);
+ (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
return &fenced_mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 26ce60314b9..f614abfc2e8 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -417,7 +417,7 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
pb_debug_buffer_fill(buf);
- pipe_mutex_init(buf->mutex);
+ (void) mtx_init(&buf->mutex, mtx_plain);
pipe_mutex_lock(mgr->mutex);
LIST_ADDTAIL(&buf->head, &mgr->list);
@@ -475,7 +475,7 @@ pb_debug_manager_create(struct pb_manager *provider,
mgr->underflow_size = underflow_size;
mgr->overflow_size = overflow_size;
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
LIST_INITHEAD(&mgr->list);
return &mgr->base;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index ef7e5adac32..52cd115b5e9 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -266,7 +266,7 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
mm->size = size;
mm->align2 = align2; /* 64-byte alignment */
- pipe_mutex_init(mm->mutex);
+ (void) mtx_init(&mm->mutex, mtx_plain);
mm->buffer = buffer;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
index 3bfe720b185..fe221fc14eb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
@@ -279,7 +279,7 @@ pool_bufmgr_create(struct pb_manager *provider,
pool->bufSize = bufSize;
pool->bufAlign = desc->alignment;
- pipe_mutex_init(pool->mutex);
+ (void) mtx_init(&pool->mutex, mtx_plain);
pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc);
if (!pool->buffer)
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
index 54aba980179..43313d893b1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
@@ -473,7 +473,7 @@ pb_slab_manager_create(struct pb_manager *provider,
LIST_INITHEAD(&mgr->slabs);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
return &mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.c b/src/gallium/auxiliary/pipebuffer/pb_cache.c
index a1ca678833e..422318c599b 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_cache.c
@@ -280,7 +280,7 @@ pb_cache_init(struct pb_cache *mgr, uint usecs, float size_factor,
for (i = 0; i < ARRAY_SIZE(mgr->buckets); i++)
LIST_INITHEAD(&mgr->buckets[i]);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
mgr->cache_size = 0;
mgr->max_cache_size = maximum_cache_size;
mgr->usecs = usecs;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.c b/src/gallium/auxiliary/pipebuffer/pb_slab.c
index 79529dfe5e9..6f6664f4297 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_slab.c
@@ -224,7 +224,7 @@ pb_slabs_init(struct pb_slabs *slabs,
LIST_INITHEAD(&group->slabs);
}
- pipe_mutex_init(slabs->mutex);
+ (void) mtx_init(&slabs->mutex, mtx_plain);
return true;
}
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index d12520501ed..bcce4f4ec1e 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -116,7 +116,7 @@ debug_flush_buf_create(boolean supports_unsync, unsigned bt_depth)
fbuf->supports_unsync = supports_unsync;
fbuf->bt_depth = bt_depth;
pipe_reference_init(&fbuf->reference, 1);
- pipe_mutex_init(fbuf->mutex);
+ (void) mtx_init(&fbuf->mutex, mtx_plain);
return fbuf;
out_no_buf:
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index eda95bbfff7..754ee8b1fe1 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -89,7 +89,7 @@ debug_serial(void *p, unsigned *pserial)
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(serials_mutex);
+ (void) mtx_init(&serials_mutex, mtx_plain);
first = FALSE;
}
#endif
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index cfd354a6fe6..9a4eafa2ec0 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -296,7 +296,7 @@ debug_symbol_name_cached(const void *addr)
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(symbols_mutex);
+ (void) mtx_init(&symbols_mutex, mtx_plain);
first = FALSE;
}
#endif
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index ca637ad922b..56a9fa8cf32 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -113,7 +113,7 @@ void
util_queue_fence_init(struct util_queue_fence *fence)
{
memset(fence, 0, sizeof(*fence));
- pipe_mutex_init(fence->mutex);
+ (void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->cond);
fence->signalled = true;
}
@@ -210,7 +210,7 @@ util_queue_init(struct util_queue *queue,
if (!queue->jobs)
goto fail;
- pipe_mutex_init(queue->lock);
+ (void) mtx_init(&queue->lock, mtx_plain);
queue->num_queued = 0;
cnd_init(&queue->has_queued_cond);
diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h
index 9055d7b6007..24c78ba662e 100644
--- a/src/gallium/auxiliary/util/u_range.h
+++ b/src/gallium/auxiliary/util/u_range.h
@@ -78,7 +78,7 @@ util_ranges_intersect(struct util_range *range, unsigned start, unsigned end)
static inline void
util_range_init(struct util_range *range)
{
- pipe_mutex_init(range->write_mutex);
+ (void) mtx_init(&range->write_mutex, mtx_plain);
util_range_set_empty(range);
}
diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c
index 19f82f52bf6..fce113314ae 100644
--- a/src/gallium/auxiliary/util/u_ringbuffer.c
+++ b/src/gallium/auxiliary/util/u_ringbuffer.c
@@ -36,7 +36,7 @@ struct util_ringbuffer *util_ringbuffer_create( unsigned dwords )
ring->mask = dwords - 1;
cnd_init(&ring->change);
- pipe_mutex_init(ring->mutex);
+ (void) mtx_init(&ring->mutex, mtx_plain);
return ring;
fail:
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index ba47b734bba..1ce4a3b576e 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -870,7 +870,7 @@ dd_context_create(struct dd_screen *dscreen, struct pipe_context *pipe)
*dctx->mapped_fence = 0;
- pipe_mutex_init(dctx->mutex);
+ (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);
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index e667187d34c..3f43b8d9d86 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -705,7 +705,7 @@ fd_screen_create(struct fd_device *dev)
fd_bc_init(&screen->batch_cache);
- pipe_mutex_init(screen->lock);
+ (void) mtx_init(&screen->lock, mtx_plain);
pscreen->destroy = fd_screen_destroy;
pscreen->get_param = fd_screen_get_param;
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c
index 115589f8705..04c148395e3 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.c
+++ b/src/gallium/drivers/llvmpipe/lp_fence.c
@@ -52,7 +52,7 @@ lp_fence_create(unsigned rank)
pipe_reference_init(&fence->reference, 1);
- pipe_mutex_init(fence->mutex);
+ (void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->signalled);
fence->id = fence_id++;
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 223be931e05..0d619eff3ff 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -62,7 +62,7 @@ lp_scene_create( struct pipe_context *pipe )
scene->data.head =
CALLOC_STRUCT(data_block);
- pipe_mutex_init(scene->mutex);
+ (void) mtx_init(&scene->mutex, mtx_plain);
#ifdef DEBUG
/* Do some scene limit sanity checks here */
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 1c94b6e4921..f5f7e7178da 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -668,7 +668,7 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
FREE(screen);
return NULL;
}
- pipe_mutex_init(screen->rast_mutex);
+ (void) mtx_init(&screen->rast_mutex, mtx_plain);
util_format_s3tc_init();
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index 01bf14ba730..5635e9fe557 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -1755,7 +1755,7 @@ nv50_blitter_create(struct nv50_screen *screen)
return false;
}
- pipe_mutex_init(screen->blitter->mutex);
+ (void) mtx_init(&screen->blitter->mutex, mtx_plain);
nv50_blitter_make_vp(screen->blitter);
nv50_blitter_make_sampler(screen->blitter);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index 96b2b5fa906..5720937c090 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -1664,7 +1664,7 @@ nvc0_blitter_create(struct nvc0_screen *screen)
}
screen->blitter->screen = screen;
- pipe_mutex_init(screen->blitter->mutex);
+ (void) mtx_init(&screen->blitter->mutex, mtx_plain);
nvc0_blitter_make_vp(screen->blitter);
nvc0_blitter_make_sampler(screen->blitter);
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 903502d407e..392b0bb6a8a 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -751,7 +751,7 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws)
slab_create_parent(&r300screen->pool_transfers, sizeof(struct pipe_transfer), 64);
util_format_s3tc_init();
- pipe_mutex_init(r300screen->cmask_mutex);
+ (void) mtx_init(&r300screen->cmask_mutex, mtx_plain);
return &r300screen->screen;
}
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 26d07750f9f..96b95ab09b6 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1311,8 +1311,8 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
}
util_format_s3tc_init();
- pipe_mutex_init(rscreen->aux_context_lock);
- pipe_mutex_init(rscreen->gpu_load_mutex);
+ (void) mtx_init(&rscreen->aux_context_lock, mtx_plain);
+ (void) mtx_init(&rscreen->gpu_load_mutex, mtx_plain);
if (rscreen->debug_flags & DBG_INFO) {
printf("pci_id = 0x%x\n", rscreen->info.pci_id);
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index d04abb6d203..723975aa01c 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -826,7 +826,7 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
sscreen->b.has_cp_dma = true;
sscreen->b.has_streamout = true;
- pipe_mutex_init(sscreen->shader_parts_mutex);
+ (void) mtx_init(&sscreen->shader_parts_mutex, mtx_plain);
sscreen->use_monolithic_shaders =
(sscreen->b.debug_flags & DBG_MONOLITHIC_SHADERS) != 0;
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index a82e38e872d..20410cebdae 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -299,7 +299,7 @@ static void si_destroy_shader_cache_entry(struct hash_entry *entry)
bool si_init_shader_cache(struct si_screen *sscreen)
{
- pipe_mutex_init(sscreen->shader_cache_mutex);
+ (void) mtx_init(&sscreen->shader_cache_mutex, mtx_plain);
sscreen->shader_cache =
_mesa_hash_table_create(NULL,
si_shader_cache_key_hash,
@@ -1764,7 +1764,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
sel->db_shader_control |= S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
}
- pipe_mutex_init(sel->mutex);
+ (void) mtx_init(&sel->mutex, mtx_plain);
util_queue_fence_init(&sel->ready);
if ((sctx->b.debug.debug_message && !sctx->b.debug.async) ||
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index e34278e64ff..4723c49d124 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -1203,10 +1203,10 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
if (!rb_pipe)
return NULL;
- pipe_mutex_init(rb_pipe->draw_mutex);
+ (void) mtx_init(&rb_pipe->draw_mutex, mtx_plain);
cnd_init(&rb_pipe->draw_cond);
- pipe_mutex_init(rb_pipe->call_mutex);
- pipe_mutex_init(rb_pipe->list_mutex);
+ (void) mtx_init(&rb_pipe->call_mutex, mtx_plain);
+ (void) mtx_init(&rb_pipe->list_mutex, mtx_plain);
make_empty_list(&rb_pipe->shaders);
rb_pipe->base.screen = _screen;
diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c
index 3ed90908ceb..7505dd750a5 100644
--- a/src/gallium/drivers/rbug/rbug_screen.c
+++ b/src/gallium/drivers/rbug/rbug_screen.c
@@ -279,7 +279,7 @@ rbug_screen_create(struct pipe_screen *screen)
if (!rb_screen)
return screen;
- pipe_mutex_init(rb_screen->list_mutex);
+ (void) mtx_init(&rb_screen->list_mutex, mtx_plain);
make_empty_list(&rb_screen->contexts);
make_empty_list(&rb_screen->resources);
make_empty_list(&rb_screen->surfaces);
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 90f8e2b2fc9..479b6fc522f 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -1104,8 +1104,8 @@ svga_screen_create(struct svga_winsys_screen *sws)
debug_printf("svga: msaa samples mask: 0x%x\n", svgascreen->ms_samples);
}
- pipe_mutex_init(svgascreen->tex_mutex);
- pipe_mutex_init(svgascreen->swc_mutex);
+ (void) mtx_init(&svgascreen->tex_mutex, mtx_plain);
+ (void) mtx_init(&svgascreen->swc_mutex, mtx_plain);
svga_screen_cache_init(svgascreen);
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index 27c3fbc540e..514fc00afa4 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -408,7 +408,7 @@ svga_screen_cache_init(struct svga_screen *svgascreen)
assert(cache->total_size == 0);
- pipe_mutex_init(cache->mutex);
+ (void) mtx_init(&cache->mutex, mtx_plain);
for (i = 0; i < SVGA_HOST_SURFACE_CACHE_BUCKETS; ++i)
LIST_INITHEAD(&cache->bucket[i]);
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 31ab0db99a2..2a12ef8ba64 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -610,7 +610,7 @@ vc4_screen_create(int fd)
screen->fd = fd;
list_inithead(&screen->bo_cache.time_list);
- pipe_mutex_init(screen->bo_handles_mutex);
+ (void) mtx_init(&screen->bo_handles_mutex, mtx_plain);
screen->bo_handles = util_hash_table_create(handle_hash, handle_compare);
screen->has_control_flow =
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index c4f2c57d1cf..1ad15b53b7a 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1930,7 +1930,7 @@ dri2_init_screen(__DRIscreen * sPriv)
screen->sPriv = sPriv;
screen->fd = sPriv->fd;
- pipe_mutex_init(screen->opencl_func_mutex);
+ (void) mtx_init(&screen->opencl_func_mutex, mtx_plain);
sPriv->driverPrivate = (void *)screen;
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 9297b689050..92d2cec0284 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -242,7 +242,7 @@ xmesa_init_display( Display *display )
}
if (xmdpy->screen && xmdpy->smapi) {
- pipe_mutex_init(xmdpy->mutex);
+ (void) mtx_init(&xmdpy->mutex, mtx_plain);
}
else {
if (xmdpy->screen) {
diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c
index 4724b6be584..30b0e303c0f 100644
--- a/src/gallium/state_trackers/nine/nine_queue.c
+++ b/src/gallium/state_trackers/nine/nine_queue.c
@@ -241,10 +241,10 @@ nine_queue_create(void)
}
cnd_init(&ctx->event_pop);
- pipe_mutex_init(ctx->mutex_pop);
+ (void) mtx_init(&ctx->mutex_pop, mtx_plain);
cnd_init(&ctx->event_push);
- pipe_mutex_init(ctx->mutex_push);
+ (void) mtx_init(&ctx->mutex_push, mtx_plain);
/* Block until first cmdbuf has been flushed. */
ctx->worker_wait = TRUE;
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 231e42272ec..a331f7ca8d6 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -152,9 +152,9 @@ nine_csmt_create( struct NineDevice9 *This )
return NULL;
}
cnd_init(&ctx->event_processed);
- pipe_mutex_init(ctx->mutex_processed);
- pipe_mutex_init(ctx->thread_running);
- pipe_mutex_init(ctx->thread_resume);
+ (void) mtx_init(&ctx->mutex_processed, mtx_plain);
+ (void) mtx_init(&ctx->thread_running, mtx_plain);
+ (void) mtx_init(&ctx->thread_resume, mtx_plain);
#if DEBUG
pipe_thread_setname("Main thread");
diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
index d749e65308e..84bb805d8fa 100644
--- a/src/gallium/state_trackers/va/context.c
+++ b/src/gallium/state_trackers/va/context.c
@@ -163,7 +163,7 @@ VA_DRIVER_INIT_FUNC(VADriverContextP ctx)
vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, true, &drv->csc);
if (!vl_compositor_set_csc_matrix(&drv->cstate, (const vl_csc_matrix *)&drv->csc, 1.0f, 0.0f))
goto error_csc_matrix;
- pipe_mutex_init(drv->mutex);
+ (void) mtx_init(&drv->mutex, mtx_plain);
ctx->pDriverData = (void *)drv;
ctx->version_major = 0;
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index f85bce823bb..628e5030c5a 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -136,7 +136,7 @@ vlVdpDecoderCreate(VdpDevice device,
goto error_handle;
}
- pipe_mutex_init(vldecoder->mutex);
+ (void) mtx_init(&vldecoder->mutex, mtx_plain);
pipe_mutex_unlock(dev->mutex);
return VDP_STATUS_OK;
diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c
index 4f4ffdffe7d..15652f08bf8 100644
--- a/src/gallium/state_trackers/vdpau/device.c
+++ b/src/gallium/state_trackers/vdpau/device.c
@@ -133,7 +133,7 @@ vdp_imp_device_create_x11(Display *display, int screen, VdpDevice *device,
goto no_compositor;
}
- pipe_mutex_init(dev->mutex);
+ (void) mtx_init(&dev->mutex, mtx_plain);
*get_proc_address = &vlVdpGetProcAddress;
diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
index 1e3874bdb17..df222f6580a 100644
--- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
+++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
@@ -55,7 +55,7 @@ GalliumContext::GalliumContext(ulong options)
CreateScreen();
- pipe_mutex_init(fMutex);
+ (void) mtx_init(&fMutex, mtx_plain);
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index e16e13d9c28..f19c935f085 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -591,8 +591,8 @@ amdgpu_winsys_create(int fd, radeon_screen_create_t screen_create)
amdgpu_surface_init_functions(ws);
LIST_INITHEAD(&ws->global_bo_list);
- pipe_mutex_init(ws->global_bo_list_lock);
- pipe_mutex_init(ws->bo_fence_lock);
+ (void) mtx_init(&ws->global_bo_list_lock, mtx_plain);
+ (void) mtx_init(&ws->bo_fence_lock, mtx_plain);
if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1)) {
amdgpu_winsys_destroy(&ws->base);
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 2524339c9ee..e54dcaca679 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -637,7 +637,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws,
bo->va = 0;
bo->initial_domain = initial_domains;
bo->hash = __sync_fetch_and_add(&rws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
pb_cache_init_entry(&rws->bo_cache, &bo->u.real.cache_entry, &bo->base,
pb_cache_bucket);
@@ -1076,7 +1076,7 @@ static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws,
bo->va = 0;
bo->initial_domain = RADEON_DOMAIN_GTT;
bo->hash = __sync_fetch_and_add(&ws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
@@ -1210,7 +1210,7 @@ static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws,
bo->rws = ws;
bo->va = 0;
bo->hash = __sync_fetch_and_add(&ws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
if (bo->flink_name)
util_hash_table_set(ws->bo_names, (void*)(uintptr_t)bo->flink_name, bo);
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 2726237329a..abab4aab8d8 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -804,15 +804,15 @@ radeon_drm_winsys_create(int fd, radeon_screen_create_t screen_create)
radeon_drm_cs_init_functions(ws);
radeon_surface_init_functions(ws);
- pipe_mutex_init(ws->hyperz_owner_mutex);
- pipe_mutex_init(ws->cmask_owner_mutex);
+ (void) mtx_init(&ws->hyperz_owner_mutex, mtx_plain);
+ (void) mtx_init(&ws->cmask_owner_mutex, mtx_plain);
ws->bo_names = util_hash_table_create(handle_hash, handle_compare);
ws->bo_handles = util_hash_table_create(handle_hash, handle_compare);
ws->bo_vas = util_hash_table_create(handle_hash, handle_compare);
- pipe_mutex_init(ws->bo_handles_mutex);
- pipe_mutex_init(ws->bo_va_mutex);
- pipe_mutex_init(ws->bo_fence_lock);
+ (void) mtx_init(&ws->bo_handles_mutex, mtx_plain);
+ (void) mtx_init(&ws->bo_va_mutex, mtx_plain);
+ (void) mtx_init(&ws->bo_fence_lock, mtx_plain);
ws->va_offset = ws->va_start;
list_inithead(&ws->va_holes);
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 4c5a12121f8..0553662380f 100644
--- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
+++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
@@ -841,7 +841,7 @@ simple_fenced_bufmgr_create(struct pb_manager *provider,
LIST_INITHEAD(&fenced_mgr->unfenced);
fenced_mgr->num_unfenced = 0;
- pipe_mutex_init(fenced_mgr->mutex);
+ (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
return &fenced_mgr->base;
}
diff --git a/src/gallium/winsys/svga/drm/vmw_fence.c b/src/gallium/winsys/svga/drm/vmw_fence.c
index 0fbb078a84d..b18d5bf5d5d 100644
--- a/src/gallium/winsys/svga/drm/vmw_fence.c
+++ b/src/gallium/winsys/svga/drm/vmw_fence.c
@@ -421,7 +421,7 @@ vmw_fence_ops_create(struct vmw_winsys_screen *vws)
if(!ops)
return NULL;
- pipe_mutex_init(ops->mutex);
+ (void) mtx_init(&ops->mutex, mtx_plain);
LIST_INITHEAD(&ops->not_signaled);
ops->base.destroy = &vmw_fence_ops_destroy;
ops->base.fence_reference = &vmw_fence_ops_fence_reference;
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c
index 3a936e7e690..17a1e760dd0 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c
@@ -156,7 +156,7 @@ vmw_svga_winsys_surface_create(struct svga_winsys_screen *sws,
pipe_reference_init(&surface->refcnt, 1);
p_atomic_set(&surface->validated, 0);
surface->screen = vws;
- pipe_mutex_init(surface->mutex);
+ (void) mtx_init(&surface->mutex, mtx_plain);
surface->shared = !!(usage & SVGA_SURFACE_USAGE_SHARED);
provider = (surface->shared) ? vws->pools.gmr : vws->pools.mob_fenced;
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
index 73538730f5e..b6a42343a5e 100644
--- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
+++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
@@ -776,8 +776,8 @@ virgl_drm_winsys_create(int drmFD)
qdws->num_delayed = 0;
qdws->usecs = 1000000;
LIST_INITHEAD(&qdws->delayed);
- pipe_mutex_init(qdws->mutex);
- pipe_mutex_init(qdws->bo_handles_mutex);
+ (void) mtx_init(&qdws->mutex, mtx_plain);
+ (void) mtx_init(&qdws->bo_handles_mutex, mtx_plain);
qdws->bo_handles = util_hash_table_create(handle_hash, handle_compare);
qdws->bo_names = util_hash_table_create(handle_hash, handle_compare);
qdws->base.destroy = virgl_drm_winsys_destroy;
diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
index ce8ac97756f..a8c874a4f69 100644
--- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
+++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
@@ -637,7 +637,7 @@ virgl_vtest_winsys_wrap(struct sw_winsys *sws)
vtws->usecs = 1000000;
LIST_INITHEAD(&vtws->delayed);
- pipe_mutex_init(vtws->mutex);
+ (void) mtx_init(&vtws->mutex, mtx_plain);
vtws->base.destroy = virgl_vtest_winsys_destroy;