summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:12:30 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:52:38 +1100
commitba72554f3e576c1674d52ab16d8d2edff9398b71 (patch)
tree317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/drivers
parentbe188289e1bf0e259c91a751c405d54bb99bc5d4 (diff)
gallium/util: replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/ddebug/dd_context.c2
-rw-r--r--src/gallium/drivers/ddebug/dd_draw.c6
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c8
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch_cache.c14
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h2
-rw-r--r--src/gallium/drivers/freedreno/freedreno_draw.c4
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.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_blit.c2
-rw-r--r--src/gallium/drivers/r300/r300_texture.c2
-rw-r--r--src/gallium/drivers/radeon/r600_gpu_load.c2
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c2
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c6
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c124
-rw-r--r--src/gallium/drivers/rbug/rbug_core.c52
-rw-r--r--src/gallium/drivers/rbug/rbug_screen.h4
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c4
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c2
-rw-r--r--src/gallium/drivers/svga/svga_sampler_view.c4
-rw-r--r--src/gallium/drivers/svga/svga_screen_cache.c6
-rw-r--r--src/gallium/drivers/trace/tr_dump.c10
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.c10
-rw-r--r--src/gallium/drivers/vc4/vc4_bufmgr.h2
29 files changed, 144 insertions, 144 deletions
diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c
index 550f7641cc2..109d64259b2 100644
--- a/src/gallium/drivers/ddebug/dd_context.c
+++ b/src/gallium/drivers/ddebug/dd_context.c
@@ -594,7 +594,7 @@ dd_context_destroy(struct pipe_context *_pipe)
struct pipe_context *pipe = dctx->pipe;
if (dctx->thread) {
- pipe_mutex_lock(dctx->mutex);
+ mtx_lock(&dctx->mutex);
dctx->kill_thread = 1;
pipe_mutex_unlock(dctx->mutex);
pipe_thread_wait(dctx->thread);
diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index 7bc7844fd47..17b404a3edd 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -904,7 +904,7 @@ PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
struct dd_context *dctx = (struct dd_context *)input;
struct dd_screen *dscreen = dd_screen(dctx->base.screen);
- pipe_mutex_lock(dctx->mutex);
+ mtx_lock(&dctx->mutex);
while (!dctx->kill_thread) {
struct dd_draw_record **record = &dctx->records;
@@ -944,7 +944,7 @@ PIPE_THREAD_ROUTINE(dd_thread_pipelined_hang_detect, input)
/* Unlock and sleep before starting all over again. */
pipe_mutex_unlock(dctx->mutex);
os_time_sleep(10000); /* 10 ms */
- pipe_mutex_lock(dctx->mutex);
+ mtx_lock(&dctx->mutex);
}
/* Thread termination. */
@@ -1041,7 +1041,7 @@ dd_pipelined_process_draw(struct dd_context *dctx, struct dd_call *call)
dd_copy_draw_state(&record->draw_state.base, &dctx->draw_state);
/* Add the record to the list. */
- pipe_mutex_lock(dctx->mutex);
+ mtx_lock(&dctx->mutex);
record->next = dctx->records;
dctx->records = record;
pipe_mutex_unlock(dctx->mutex);
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index c6dcf11aca5..f08b7b3a1bf 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -170,7 +170,7 @@ batch_reset_resources_locked(struct fd_batch *batch)
static void
batch_reset_resources(struct fd_batch *batch)
{
- pipe_mutex_lock(batch->ctx->screen->lock);
+ mtx_lock(&batch->ctx->screen->lock);
batch_reset_resources_locked(batch);
pipe_mutex_unlock(batch->ctx->screen->lock);
}
@@ -203,7 +203,7 @@ __fd_batch_destroy(struct fd_batch *batch)
util_copy_framebuffer_state(&batch->framebuffer, NULL);
- pipe_mutex_lock(batch->ctx->screen->lock);
+ mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, true);
pipe_mutex_unlock(batch->ctx->screen->lock);
@@ -287,7 +287,7 @@ batch_flush(struct fd_batch *batch)
if (batch == batch->ctx->batch) {
batch_reset(batch);
} else {
- pipe_mutex_lock(batch->ctx->screen->lock);
+ mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, false);
pipe_mutex_unlock(batch->ctx->screen->lock);
}
@@ -339,7 +339,7 @@ batch_add_dep(struct fd_batch *batch, struct fd_batch *dep)
DBG("%p: flush forced on %p!", batch, dep);
pipe_mutex_unlock(batch->ctx->screen->lock);
fd_batch_flush(dep, false);
- pipe_mutex_lock(batch->ctx->screen->lock);
+ mtx_lock(&batch->ctx->screen->lock);
} else {
struct fd_batch *other = NULL;
fd_batch_reference_locked(&other, dep);
diff --git a/src/gallium/drivers/freedreno/freedreno_batch_cache.c b/src/gallium/drivers/freedreno/freedreno_batch_cache.c
index f3d5078d1c3..5a881bffd42 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch_cache.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch_cache.c
@@ -130,7 +130,7 @@ fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
struct hash_entry *entry;
struct fd_batch *last_batch = NULL;
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
hash_table_foreach(cache->ht, entry) {
struct fd_batch *batch = NULL;
@@ -139,7 +139,7 @@ fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx)
pipe_mutex_unlock(ctx->screen->lock);
fd_batch_reference(&last_batch, batch);
fd_batch_flush(batch, false);
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
}
fd_batch_reference_locked(&batch, NULL);
}
@@ -158,7 +158,7 @@ fd_bc_invalidate_context(struct fd_context *ctx)
struct fd_batch_cache *cache = &ctx->screen->batch_cache;
struct fd_batch *batch;
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
foreach_batch(batch, cache, cache->batch_mask) {
if (batch->ctx == ctx)
@@ -207,7 +207,7 @@ fd_bc_invalidate_resource(struct fd_resource *rsc, bool destroy)
struct fd_screen *screen = fd_screen(rsc->base.b.screen);
struct fd_batch *batch;
- pipe_mutex_lock(screen->lock);
+ mtx_lock(&screen->lock);
if (destroy) {
foreach_batch(batch, &screen->batch_cache, rsc->batch_mask) {
@@ -233,7 +233,7 @@ fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx)
struct fd_batch *batch;
uint32_t idx;
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
while ((idx = ffs(~cache->batch_mask)) == 0) {
#if 0
@@ -266,7 +266,7 @@ fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx)
pipe_mutex_unlock(ctx->screen->lock);
DBG("%p: too many batches! flush forced!", flush_batch);
fd_batch_flush(flush_batch, true);
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
/* While the resources get cleaned up automatically, the flush_batch
* doesn't get removed from the dependencies of other batches, so
@@ -338,7 +338,7 @@ batch_from_key(struct fd_batch_cache *cache, struct key *key,
if (!batch)
return NULL;
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
_mesa_hash_table_insert_pre_hashed(cache->ht, hash, key, batch);
batch->key = key;
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index 995e7d4c433..d65f19a8240 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -316,7 +316,7 @@ fd_context_assert_locked(struct fd_context *ctx)
static inline void
fd_context_lock(struct fd_context *ctx)
{
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
}
static inline void
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c
index 5d5b7c11beb..b98faca60ee 100644
--- a/src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/src/gallium/drivers/freedreno/freedreno_draw.c
@@ -110,7 +110,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
* Figure out the buffers/features we need:
*/
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
if (fd_depth_enabled(ctx)) {
buffers |= FD_BUFFER_DEPTH;
@@ -332,7 +332,7 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
batch->resolve |= buffers;
batch->needs_flush = true;
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
if (buffers & PIPE_CLEAR_COLOR)
for (i = 0; i < pfb->nr_cbufs; i++)
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 5a2bdfc6651..275de97b8c7 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -179,7 +179,7 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
*/
fd_bc_invalidate_resource(rsc, false);
- pipe_mutex_lock(ctx->screen->lock);
+ mtx_lock(&ctx->screen->lock);
/* Swap the backing bo's, so shadow becomes the old buffer,
* blit from shadow to new buffer. From here on out, we
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c
index ec26bfe9532..e7c4ab6979e 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.c
+++ b/src/gallium/drivers/llvmpipe/lp_fence.c
@@ -88,7 +88,7 @@ lp_fence_signal(struct lp_fence *fence)
if (LP_DEBUG & DEBUG_FENCE)
debug_printf("%s %d\n", __FUNCTION__, fence->id);
- pipe_mutex_lock(fence->mutex);
+ mtx_lock(&fence->mutex);
fence->count++;
assert(fence->count <= fence->rank);
@@ -116,7 +116,7 @@ lp_fence_wait(struct lp_fence *f)
if (LP_DEBUG & DEBUG_FENCE)
debug_printf("%s %d\n", __FUNCTION__, f->id);
- pipe_mutex_lock(f->mutex);
+ mtx_lock(&f->mutex);
assert(f->issued);
while (f->count < f->rank) {
cnd_wait(&f->signalled, &f->mutex);
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 66dd1d23257..d651192702a 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -484,7 +484,7 @@ lp_scene_bin_iter_next( struct lp_scene *scene , int *x, int *y)
{
struct cmd_bin *bin = NULL;
- pipe_mutex_lock(scene->mutex);
+ mtx_lock(&scene->mutex);
if (scene->curr_x < 0) {
/* first bin */
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 768775b2912..f701e9087ab 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -165,7 +165,7 @@ lp_setup_rasterize_scene( struct lp_setup_context *setup )
if (setup->last_fence)
setup->last_fence->issued = TRUE;
- pipe_mutex_lock(screen->rast_mutex);
+ mtx_lock(&screen->rast_mutex);
/* FIXME: We enqueue the scene then wait on the rasterizer to finish.
* This means we never actually run any vertex stuff in parallel to
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
index 46cd2e61f9d..1e7718416ad 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
@@ -1078,7 +1078,7 @@ nv50_blit_select_fp(struct nv50_blitctx *ctx, const struct pipe_blit_info *info)
const unsigned mode = ctx->mode;
if (!blitter->fp[targ][mode]) {
- pipe_mutex_lock(blitter->mutex);
+ mtx_lock(&blitter->mutex);
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nv50->base.pipe, mode, ptarg);
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index 1e91fa8b6ee..5c4fda9c071 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -918,7 +918,7 @@ nvc0_blit_select_fp(struct nvc0_blitctx *ctx, const struct pipe_blit_info *info)
const unsigned mode = ctx->mode;
if (!blitter->fp[targ][mode]) {
- pipe_mutex_lock(blitter->mutex);
+ mtx_lock(&blitter->mutex);
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nvc0->base.pipe, mode, ptarg);
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index b5c3ae5ac3b..7d58d4cb3ea 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -328,7 +328,7 @@ static void r300_clear(struct pipe_context* pipe,
/* Pair the resource with the CMASK to avoid other resources
* accessing it. */
if (!r300->screen->cmask_resource) {
- pipe_mutex_lock(r300->screen->cmask_mutex);
+ mtx_lock(&r300->screen->cmask_mutex);
/* Double checking (first unlocked, then locked). */
if (!r300->screen->cmask_resource) {
/* Don't reference this, so that the texture can be
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 929c3fe6c12..b451b9f0a4d 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -1030,7 +1030,7 @@ static void r300_texture_destroy(struct pipe_screen *screen,
struct r300_resource* tex = (struct r300_resource*)texture;
if (tex->tex.cmask_dwords) {
- pipe_mutex_lock(rscreen->cmask_mutex);
+ mtx_lock(&rscreen->cmask_mutex);
if (texture == rscreen->cmask_resource) {
rscreen->cmask_resource = NULL;
}
diff --git a/src/gallium/drivers/radeon/r600_gpu_load.c b/src/gallium/drivers/radeon/r600_gpu_load.c
index 9697314081a..acbd1793312 100644
--- a/src/gallium/drivers/radeon/r600_gpu_load.c
+++ b/src/gallium/drivers/radeon/r600_gpu_load.c
@@ -178,7 +178,7 @@ static uint64_t r600_read_mmio_counter(struct r600_common_screen *rscreen,
{
/* Start the thread if needed. */
if (!rscreen->gpu_load_thread) {
- pipe_mutex_lock(rscreen->gpu_load_mutex);
+ mtx_lock(&rscreen->gpu_load_mutex);
/* Check again inside the mutex. */
if (!rscreen->gpu_load_thread)
rscreen->gpu_load_thread =
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 0020686e58b..8778f0beaf9 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -1403,7 +1403,7 @@ void r600_screen_clear_buffer(struct r600_common_screen *rscreen, struct pipe_re
{
struct r600_common_context *rctx = (struct r600_common_context*)rscreen->aux_context;
- pipe_mutex_lock(rscreen->aux_context_lock);
+ mtx_lock(&rscreen->aux_context_lock);
rctx->dma_clear_buffer(&rctx->b, dst, offset, size, value);
rscreen->aux_context->flush(rscreen->aux_context, NULL, 0);
pipe_mutex_unlock(rscreen->aux_context_lock);
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 0865d35fd29..79c436d637d 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -305,7 +305,7 @@ static void r600_eliminate_fast_color_clear(struct r600_common_context *rctx,
struct pipe_context *ctx = &rctx->b;
if (ctx == rscreen->aux_context)
- pipe_mutex_lock(rscreen->aux_context_lock);
+ mtx_lock(&rscreen->aux_context_lock);
ctx->flush_resource(ctx, &rtex->resource.b.b);
ctx->flush(ctx, NULL, 0);
@@ -394,7 +394,7 @@ bool r600_texture_disable_dcc(struct r600_common_context *rctx,
return false;
if (&rctx->b == rscreen->aux_context)
- pipe_mutex_lock(rscreen->aux_context_lock);
+ mtx_lock(&rscreen->aux_context_lock);
/* Decompress DCC. */
rctx->decompress_dcc(&rctx->b, rtex);
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index ba2966124c7..4a346538ee4 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -7467,7 +7467,7 @@ si_get_shader_part(struct si_screen *sscreen,
{
struct si_shader_part *result;
- pipe_mutex_lock(sscreen->shader_parts_mutex);
+ mtx_lock(&sscreen->shader_parts_mutex);
/* Find existing. */
for (result = *list; result; result = result->next) {
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index c370f151dec..c7a8d1f2afb 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1256,7 +1256,7 @@ again:
if (thread_index < 0)
util_queue_fence_wait(&sel->ready);
- pipe_mutex_lock(sel->mutex);
+ mtx_lock(&sel->mutex);
/* Find the shader variant. */
for (iter = sel->first_variant; iter; iter = iter->next_variant) {
@@ -1457,7 +1457,7 @@ void si_init_shader_selector_async(void *job, int thread_index)
tgsi_binary = si_get_tgsi_binary(sel);
/* Try to load the shader from the shader cache. */
- pipe_mutex_lock(sscreen->shader_cache_mutex);
+ mtx_lock(&sscreen->shader_cache_mutex);
if (tgsi_binary &&
si_shader_cache_load_shader(sscreen, tgsi_binary, shader)) {
@@ -1475,7 +1475,7 @@ void si_init_shader_selector_async(void *job, int thread_index)
}
if (tgsi_binary) {
- pipe_mutex_lock(sscreen->shader_cache_mutex);
+ mtx_lock(&sscreen->shader_cache_mutex);
if (!si_shader_cache_insert_shader(sscreen, tgsi_binary, shader, true))
FREE(tgsi_binary);
pipe_mutex_unlock(sscreen->shader_cache_mutex);
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 4723c49d124..8d16ec2ca85 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -46,7 +46,7 @@ rbug_destroy(struct pipe_context *_pipe)
rbug_screen_remove_from_list(rb_screen, contexts, rb_pipe);
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->destroy(pipe);
rb_pipe->pipe = NULL;
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -119,10 +119,10 @@ rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->draw_mutex);
+ mtx_lock(&rb_pipe->draw_mutex);
rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
/* XXX loop over PIPE_SHADER_x here */
if (!(rb_pipe->curr.shader[PIPE_SHADER_FRAGMENT] && rb_pipe->curr.shader[PIPE_SHADER_FRAGMENT]->disabled) &&
!(rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY] && rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY]->disabled) &&
@@ -143,7 +143,7 @@ rbug_create_query(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_query *query;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
query = pipe->create_query(pipe,
query_type,
index);
@@ -158,7 +158,7 @@ rbug_destroy_query(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->destroy_query(pipe,
query);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -172,7 +172,7 @@ rbug_begin_query(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
boolean ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->begin_query(pipe, query);
pipe_mutex_unlock(rb_pipe->call_mutex);
return ret;
@@ -186,7 +186,7 @@ rbug_end_query(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
bool ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->end_query(pipe,
query);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -204,7 +204,7 @@ rbug_get_query_result(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
boolean ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->get_query_result(pipe,
query,
wait,
@@ -220,7 +220,7 @@ rbug_set_active_query_state(struct pipe_context *_pipe, boolean enable)
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_active_query_state(pipe, enable);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -233,7 +233,7 @@ rbug_create_blend_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_blend_state(pipe,
blend);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -248,7 +248,7 @@ rbug_bind_blend_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->bind_blend_state(pipe,
blend);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -261,7 +261,7 @@ rbug_delete_blend_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->delete_blend_state(pipe,
blend);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -275,7 +275,7 @@ rbug_create_sampler_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_sampler_state(pipe,
sampler);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -292,7 +292,7 @@ rbug_bind_sampler_states(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->bind_sampler_states(pipe, shader, start, count, samplers);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -304,7 +304,7 @@ rbug_delete_sampler_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->delete_sampler_state(pipe,
sampler);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -318,7 +318,7 @@ rbug_create_rasterizer_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_rasterizer_state(pipe,
rasterizer);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -333,7 +333,7 @@ rbug_bind_rasterizer_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->bind_rasterizer_state(pipe,
rasterizer);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -346,7 +346,7 @@ rbug_delete_rasterizer_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->delete_rasterizer_state(pipe,
rasterizer);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -360,7 +360,7 @@ rbug_create_depth_stencil_alpha_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -375,7 +375,7 @@ rbug_bind_depth_stencil_alpha_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->bind_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -388,7 +388,7 @@ rbug_delete_depth_stencil_alpha_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->delete_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -402,7 +402,7 @@ rbug_create_fs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_fs_state(pipe, state);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -420,7 +420,7 @@ rbug_bind_fs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *fs;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
fs = rbug_shader_unwrap(_fs);
rb_pipe->curr.shader[PIPE_SHADER_FRAGMENT] = rbug_shader(_fs);
@@ -437,7 +437,7 @@ rbug_delete_fs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_fs);
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -450,7 +450,7 @@ rbug_create_vs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_vs_state(pipe, state);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -468,7 +468,7 @@ rbug_bind_vs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *vs;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
vs = rbug_shader_unwrap(_vs);
rb_pipe->curr.shader[PIPE_SHADER_VERTEX] = rbug_shader(_vs);
@@ -498,7 +498,7 @@ rbug_create_gs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *result;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_gs_state(pipe, state);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -516,7 +516,7 @@ rbug_bind_gs_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *gs;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
gs = rbug_shader_unwrap(_gs);
rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY] = rbug_shader(_gs);
@@ -533,7 +533,7 @@ rbug_delete_gs_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_gs);
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -547,7 +547,7 @@ rbug_create_vertex_elements_state(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
void *ret;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
@@ -563,7 +563,7 @@ rbug_bind_vertex_elements_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->bind_vertex_elements_state(pipe,
velems);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -576,7 +576,7 @@ rbug_delete_vertex_elements_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->delete_vertex_elements_state(pipe,
velems);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -589,7 +589,7 @@ rbug_set_blend_color(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_blend_color(pipe,
blend_color);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -602,7 +602,7 @@ rbug_set_stencil_ref(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_stencil_ref(pipe,
stencil_ref);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -615,7 +615,7 @@ rbug_set_clip_state(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_clip_state(pipe,
clip);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -637,7 +637,7 @@ rbug_set_constant_buffer(struct pipe_context *_pipe,
cb.buffer = rbug_resource_unwrap(_cb->buffer);
}
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_constant_buffer(pipe,
shader,
index,
@@ -656,7 +656,7 @@ rbug_set_framebuffer_state(struct pipe_context *_pipe,
unsigned i;
/* must protect curr status */
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
rb_pipe->curr.nr_cbufs = 0;
memset(rb_pipe->curr.cbufs, 0, sizeof(rb_pipe->curr.cbufs));
@@ -691,7 +691,7 @@ rbug_set_polygon_stipple(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_polygon_stipple(pipe,
poly_stipple);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -706,7 +706,7 @@ rbug_set_scissor_states(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_scissor_states(pipe, start_slot, num_scissors, scissor);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -720,7 +720,7 @@ rbug_set_viewport_states(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_viewport_states(pipe, start_slot, num_viewports, viewport);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -741,7 +741,7 @@ rbug_set_sampler_views(struct pipe_context *_pipe,
assert(start == 0); /* XXX fix */
/* must protect curr status */
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
rb_pipe->curr.num_views[shader] = 0;
memset(rb_pipe->curr.views[shader], 0, sizeof(rb_pipe->curr.views[shader]));
@@ -774,7 +774,7 @@ rbug_set_vertex_buffers(struct pipe_context *_pipe,
struct pipe_vertex_buffer *buffers = NULL;
unsigned i;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
if (num_buffers && _buffers) {
memcpy(unwrapped_buffers, _buffers, num_buffers * sizeof(*_buffers));
@@ -804,7 +804,7 @@ rbug_set_index_buffer(struct pipe_context *_pipe,
ib = &unwrapped_ib;
}
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_index_buffer(pipe, ib);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -816,7 +816,7 @@ rbug_set_sample_mask(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_sample_mask(pipe, sample_mask);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -831,7 +831,7 @@ rbug_create_stream_output_target(struct pipe_context *_pipe,
struct pipe_resource *res = rbug_resource_unwrap(_res);
struct pipe_stream_output_target *target;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
target = pipe->create_stream_output_target(pipe, res, buffer_offset,
buffer_size);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -845,7 +845,7 @@ rbug_stream_output_target_destroy(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->stream_output_target_destroy(pipe, target);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -859,7 +859,7 @@ rbug_set_stream_output_targets(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->set_stream_output_targets(pipe, num_targets, targets, offsets);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -882,7 +882,7 @@ rbug_resource_copy_region(struct pipe_context *_pipe,
struct pipe_resource *dst = rb_resource_dst->resource;
struct pipe_resource *src = rb_resource_src->resource;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->resource_copy_region(pipe,
dst,
dst_level,
@@ -910,7 +910,7 @@ rbug_blit(struct pipe_context *_pipe, const struct pipe_blit_info *_blit_info)
blit_info.dst.resource = dst;
blit_info.src.resource = src;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->blit(pipe, &blit_info);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -924,7 +924,7 @@ rbug_flush_resource(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_resource *res = rb_resource_res->resource;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->flush_resource(pipe, res);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -939,7 +939,7 @@ rbug_clear(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->clear(pipe,
buffers,
color,
@@ -961,7 +961,7 @@ rbug_clear_render_target(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_surface *dst = rb_surface_dst->surface;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->clear_render_target(pipe,
dst,
color,
@@ -988,7 +988,7 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
struct pipe_context *pipe = rb_pipe->pipe;
struct pipe_surface *dst = rb_surface_dst->surface;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->clear_depth_stencil(pipe,
dst,
clear_flags,
@@ -1010,7 +1010,7 @@ rbug_flush(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
pipe->flush(pipe, fence, flags);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -1026,7 +1026,7 @@ rbug_context_create_sampler_view(struct pipe_context *_pipe,
struct pipe_resource *resource = rb_resource->resource;
struct pipe_sampler_view *result;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_sampler_view(pipe,
resource,
templ);
@@ -1056,7 +1056,7 @@ rbug_context_create_surface(struct pipe_context *_pipe,
struct pipe_resource *resource = rb_resource->resource;
struct pipe_surface *result;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_surface(pipe,
resource,
surf_tmpl);
@@ -1074,7 +1074,7 @@ rbug_context_surface_destroy(struct pipe_context *_pipe,
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_surface *rb_surface = rbug_surface(_surface);
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
rbug_surface_destroy(rb_pipe,
rb_surface);
pipe_mutex_unlock(rb_pipe->call_mutex);
@@ -1097,7 +1097,7 @@ rbug_context_transfer_map(struct pipe_context *_context,
struct pipe_transfer *result;
void *map;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
map = context->transfer_map(context,
resource,
level,
@@ -1119,7 +1119,7 @@ rbug_context_transfer_flush_region(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_transfer *transfer = rb_transfer->transfer;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
context->transfer_flush_region(context,
transfer,
box);
@@ -1136,7 +1136,7 @@ rbug_context_transfer_unmap(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_transfer *transfer = rb_transfer->transfer;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
context->transfer_unmap(context,
transfer);
rbug_transfer_destroy(rb_pipe,
@@ -1156,7 +1156,7 @@ rbug_context_buffer_subdata(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_resource *resource = rb_resource->resource;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
context->buffer_subdata(context, resource, usage, offset, size, data);
pipe_mutex_unlock(rb_pipe->call_mutex);
}
@@ -1177,7 +1177,7 @@ rbug_context_texture_subdata(struct pipe_context *_context,
struct pipe_context *context = rb_pipe->pipe;
struct pipe_resource *resource = rb_resource->resource;
- pipe_mutex_lock(rb_pipe->call_mutex);
+ mtx_lock(&rb_pipe->call_mutex);
context->texture_subdata(context,
resource,
level,
diff --git a/src/gallium/drivers/rbug/rbug_core.c b/src/gallium/drivers/rbug/rbug_core.c
index 3bb781b57bf..323fafec08f 100644
--- a/src/gallium/drivers/rbug/rbug_core.c
+++ b/src/gallium/drivers/rbug/rbug_core.c
@@ -182,7 +182,7 @@ rbug_texture_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
rbug_texture_t *texs;
int i = 0;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
texs = MALLOC(rb_screen->num_resources * sizeof(rbug_texture_t));
foreach(ptr, &rb_screen->resources) {
tr_tex = container_of(ptr, struct rbug_resource, list);
@@ -206,7 +206,7 @@ rbug_texture_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
struct pipe_resource *t;
unsigned num_layers;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
foreach(ptr, &rb_screen->resources) {
tr_tex = container_of(ptr, struct rbug_resource, list);
if (gpti->texture == VOID2U64(tr_tex))
@@ -255,7 +255,7 @@ rbug_texture_read(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
void *map;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
foreach(ptr, &rb_screen->resources) {
tr_tex = container_of(ptr, struct rbug_resource, list);
if (gptr->texture == VOID2U64(tr_tex))
@@ -301,7 +301,7 @@ rbug_context_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
rbug_context_t *ctxs;
int i = 0;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
ctxs = MALLOC(rb_screen->num_contexts * sizeof(rbug_context_t));
foreach(ptr, &rb_screen->contexts) {
rb_context = container_of(ptr, struct rbug_context, list);
@@ -326,7 +326,7 @@ rbug_context_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
rbug_texture_t texs[PIPE_MAX_SHADER_SAMPLER_VIEWS];
unsigned i;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
@@ -335,8 +335,8 @@ rbug_context_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
}
/* protect the pipe context */
- pipe_mutex_lock(rb_context->draw_mutex);
- pipe_mutex_lock(rb_context->call_mutex);
+ mtx_lock(&rb_context->draw_mutex);
+ mtx_lock(&rb_context->call_mutex);
for (i = 0; i < rb_context->curr.nr_cbufs; i++)
cbufs[i] = VOID2U64(rb_context->curr.cbufs[i]);
@@ -367,7 +367,7 @@ rbug_context_draw_block(struct rbug_rbug *tr_rbug, struct rbug_header *header, u
struct rbug_screen *rb_screen = tr_rbug->rb_screen;
struct rbug_context *rb_context = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, block->context);
if (!rb_context) {
@@ -375,7 +375,7 @@ rbug_context_draw_block(struct rbug_rbug *tr_rbug, struct rbug_header *header, u
return -ESRCH;
}
- pipe_mutex_lock(rb_context->draw_mutex);
+ mtx_lock(&rb_context->draw_mutex);
rb_context->draw_blocker |= block->block;
pipe_mutex_unlock(rb_context->draw_mutex);
@@ -392,7 +392,7 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
struct rbug_screen *rb_screen = tr_rbug->rb_screen;
struct rbug_context *rb_context = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, step->context);
if (!rb_context) {
@@ -400,7 +400,7 @@ rbug_context_draw_step(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
return -ESRCH;
}
- pipe_mutex_lock(rb_context->draw_mutex);
+ mtx_lock(&rb_context->draw_mutex);
if (rb_context->draw_blocked & RBUG_BLOCK_RULE) {
if (step->step & RBUG_BLOCK_RULE)
rb_context->draw_blocked &= ~RBUG_BLOCK_MASK;
@@ -424,7 +424,7 @@ rbug_context_draw_unblock(struct rbug_rbug *tr_rbug, struct rbug_header *header,
struct rbug_screen *rb_screen = tr_rbug->rb_screen;
struct rbug_context *rb_context = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, unblock->context);
if (!rb_context) {
@@ -432,7 +432,7 @@ rbug_context_draw_unblock(struct rbug_rbug *tr_rbug, struct rbug_header *header,
return -ESRCH;
}
- pipe_mutex_lock(rb_context->draw_mutex);
+ mtx_lock(&rb_context->draw_mutex);
if (rb_context->draw_blocked & RBUG_BLOCK_RULE) {
if (unblock->unblock & RBUG_BLOCK_RULE)
rb_context->draw_blocked &= ~RBUG_BLOCK_MASK;
@@ -457,7 +457,7 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
struct rbug_screen *rb_screen = tr_rbug->rb_screen;
struct rbug_context *rb_context = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, rule->context);
if (!rb_context) {
@@ -465,7 +465,7 @@ rbug_context_draw_rule(struct rbug_rbug *tr_rbug, struct rbug_header *header, ui
return -ESRCH;
}
- pipe_mutex_lock(rb_context->draw_mutex);
+ mtx_lock(&rb_context->draw_mutex);
rb_context->draw_rule.shader[PIPE_SHADER_VERTEX] = U642VOID(rule->vertex);
rb_context->draw_rule.shader[PIPE_SHADER_FRAGMENT] = U642VOID(rule->fragment);
rb_context->draw_rule.texture = U642VOID(rule->texture);
@@ -489,7 +489,7 @@ rbug_context_flush(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32
struct rbug_screen *rb_screen = tr_rbug->rb_screen;
struct rbug_context *rb_context = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, flush->context);
if (!rb_context) {
@@ -498,7 +498,7 @@ rbug_context_flush(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32
}
/* protect the pipe context */
- pipe_mutex_lock(rb_context->call_mutex);
+ mtx_lock(&rb_context->call_mutex);
rb_context->pipe->flush(rb_context->pipe, NULL, 0);
@@ -520,7 +520,7 @@ rbug_shader_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
rbug_shader_t *shdrs;
int i = 0;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, list->context);
if (!rb_context) {
@@ -528,7 +528,7 @@ rbug_shader_list(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
return -ESRCH;
}
- pipe_mutex_lock(rb_context->list_mutex);
+ mtx_lock(&rb_context->list_mutex);
shdrs = MALLOC(rb_context->num_shaders * sizeof(rbug_shader_t));
foreach(ptr, &rb_context->shaders) {
tr_shdr = container_of(ptr, struct rbug_shader, list);
@@ -555,7 +555,7 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
unsigned original_len;
unsigned replaced_len;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
@@ -563,7 +563,7 @@ rbug_shader_info(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_t
return -ESRCH;
}
- pipe_mutex_lock(rb_context->list_mutex);
+ mtx_lock(&rb_context->list_mutex);
tr_shdr = rbug_get_shader_locked(rb_context, info->shader);
@@ -603,7 +603,7 @@ rbug_shader_disable(struct rbug_rbug *tr_rbug, struct rbug_header *header)
struct rbug_context *rb_context = NULL;
struct rbug_shader *tr_shdr = NULL;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, dis->context);
if (!rb_context) {
@@ -611,7 +611,7 @@ rbug_shader_disable(struct rbug_rbug *tr_rbug, struct rbug_header *header)
return -ESRCH;
}
- pipe_mutex_lock(rb_context->list_mutex);
+ mtx_lock(&rb_context->list_mutex);
tr_shdr = rbug_get_shader_locked(rb_context, dis->shader);
@@ -640,7 +640,7 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
struct pipe_context *pipe = NULL;
void *state;
- pipe_mutex_lock(rb_screen->list_mutex);
+ mtx_lock(&rb_screen->list_mutex);
rb_context = rbug_get_context_locked(rb_screen, rep->context);
if (!rb_context) {
@@ -648,7 +648,7 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
return -ESRCH;
}
- pipe_mutex_lock(rb_context->list_mutex);
+ mtx_lock(&rb_context->list_mutex);
tr_shdr = rbug_get_shader_locked(rb_context, rep->shader);
@@ -659,7 +659,7 @@ rbug_shader_replace(struct rbug_rbug *tr_rbug, struct rbug_header *header)
}
/* protect the pipe context */
- pipe_mutex_lock(rb_context->call_mutex);
+ mtx_lock(&rb_context->call_mutex);
pipe = rb_context->pipe;
diff --git a/src/gallium/drivers/rbug/rbug_screen.h b/src/gallium/drivers/rbug/rbug_screen.h
index 67e28762b70..9e2d8ae253f 100644
--- a/src/gallium/drivers/rbug/rbug_screen.h
+++ b/src/gallium/drivers/rbug/rbug_screen.h
@@ -68,7 +68,7 @@ rbug_screen(struct pipe_screen *screen)
#define rbug_screen_add_to_list(scr, name, obj) \
do { \
- pipe_mutex_lock(scr->list_mutex); \
+ mtx_lock(&scr->list_mutex); \
insert_at_head(&scr->name, &obj->list); \
scr->num_##name++; \
pipe_mutex_unlock(scr->list_mutex); \
@@ -76,7 +76,7 @@ rbug_screen(struct pipe_screen *screen)
#define rbug_screen_remove_from_list(scr, name, obj) \
do { \
- pipe_mutex_lock(scr->list_mutex); \
+ mtx_lock(&scr->list_mutex); \
remove_from_list(&obj->list); \
scr->num_##name--; \
pipe_mutex_unlock(scr->list_mutex); \
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index 99ed1a2e2e0..05e91cbfe5a 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -296,7 +296,7 @@ svga_buffer_transfer_flush_region( struct pipe_context *pipe,
assert(transfer->usage & PIPE_TRANSFER_WRITE);
assert(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT);
- pipe_mutex_lock(ss->swc_mutex);
+ mtx_lock(&ss->swc_mutex);
svga_buffer_add_range(sbuf, offset, offset + length);
pipe_mutex_unlock(ss->swc_mutex);
}
@@ -312,7 +312,7 @@ svga_buffer_transfer_unmap( struct pipe_context *pipe,
SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_BUFFERTRANSFERUNMAP);
- pipe_mutex_lock(ss->swc_mutex);
+ mtx_lock(&ss->swc_mutex);
assert(sbuf->map.count);
if (sbuf->map.count) {
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index b327a1679e4..e41f47520e8 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -641,7 +641,7 @@ svga_buffer_update_hw(struct svga_context *svga, struct svga_buffer *sbuf)
if (ret != PIPE_OK)
return ret;
- pipe_mutex_lock(ss->swc_mutex);
+ mtx_lock(&ss->swc_mutex);
map = svga_buffer_hw_storage_map(svga, sbuf, PIPE_TRANSFER_WRITE, &retry);
assert(map);
assert(!retry);
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c
index d43f8ccf2d3..053cfc58ce5 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.c
+++ b/src/gallium/drivers/svga/svga_sampler_view.c
@@ -91,7 +91,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
/* First try the cache */
if (view) {
- pipe_mutex_lock(ss->tex_mutex);
+ mtx_lock(&ss->tex_mutex);
if (tex->cached_view &&
tex->cached_view->min_lod == min_lod &&
tex->cached_view->max_lod == max_lod) {
@@ -163,7 +163,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
return sv;
}
- pipe_mutex_lock(ss->tex_mutex);
+ mtx_lock(&ss->tex_mutex);
svga_sampler_view_reference(&tex->cached_view, sv);
pipe_mutex_unlock(ss->tex_mutex);
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index c14996de892..55f9426217c 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -104,7 +104,7 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen,
bucket = svga_screen_cache_bucket(key);
- pipe_mutex_lock(cache->mutex);
+ mtx_lock(&cache->mutex);
curr = cache->bucket[bucket].next;
next = curr->next;
@@ -226,7 +226,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
surf_size = surface_size(key);
*p_handle = NULL;
- pipe_mutex_lock(cache->mutex);
+ mtx_lock(&cache->mutex);
if (surf_size >= SVGA_HOST_SURFACE_CACHE_BYTES) {
/* this surface is too large to cache, just free it */
@@ -318,7 +318,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen,
struct list_head *curr, *next;
unsigned bucket;
- pipe_mutex_lock(cache->mutex);
+ mtx_lock(&cache->mutex);
/* Loop over entries in the invalidated list */
curr = cache->invalidated.next;
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index b052e2a573e..2df4f833523 100644
--- a/src/gallium/drivers/trace/tr_dump.c
+++ b/src/gallium/drivers/trace/tr_dump.c
@@ -302,7 +302,7 @@ boolean trace_dump_trace_enabled(void)
void trace_dump_call_lock(void)
{
- pipe_mutex_lock(call_mutex);
+ mtx_lock(&call_mutex);
}
void trace_dump_call_unlock(void)
@@ -331,14 +331,14 @@ boolean trace_dumping_enabled_locked(void)
void trace_dumping_start(void)
{
- pipe_mutex_lock(call_mutex);
+ mtx_lock(&call_mutex);
trace_dumping_start_locked();
pipe_mutex_unlock(call_mutex);
}
void trace_dumping_stop(void)
{
- pipe_mutex_lock(call_mutex);
+ mtx_lock(&call_mutex);
trace_dumping_stop_locked();
pipe_mutex_unlock(call_mutex);
}
@@ -346,7 +346,7 @@ void trace_dumping_stop(void)
boolean trace_dumping_enabled(void)
{
boolean ret;
- pipe_mutex_lock(call_mutex);
+ mtx_lock(&call_mutex);
ret = trace_dumping_enabled_locked();
pipe_mutex_unlock(call_mutex);
return ret;
@@ -395,7 +395,7 @@ void trace_dump_call_end_locked(void)
void trace_dump_call_begin(const char *klass, const char *method)
{
- pipe_mutex_lock(call_mutex);
+ mtx_lock(&call_mutex);
trace_dump_call_begin_locked(klass, method);
}
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index c0ff531e6ab..c46e56416fe 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -97,7 +97,7 @@ vc4_bo_from_cache(struct vc4_screen *screen, uint32_t size, const char *name)
return NULL;
struct vc4_bo *bo = NULL;
- pipe_mutex_lock(cache->lock);
+ mtx_lock(&cache->lock);
if (!list_empty(&cache->size_list[page_index])) {
bo = LIST_ENTRY(struct vc4_bo, cache->size_list[page_index].next,
size_list);
@@ -188,7 +188,7 @@ vc4_bo_last_unreference(struct vc4_bo *bo)
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
- pipe_mutex_lock(screen->bo_cache.lock);
+ mtx_lock(&screen->bo_cache.lock);
vc4_bo_last_unreference_locked_timed(bo, time.tv_sec);
pipe_mutex_unlock(screen->bo_cache.lock);
}
@@ -261,7 +261,7 @@ free_stale_bos(struct vc4_screen *screen, time_t time)
static void
vc4_bo_cache_free_all(struct vc4_bo_cache *cache)
{
- pipe_mutex_lock(cache->lock);
+ mtx_lock(&cache->lock);
list_for_each_entry_safe(struct vc4_bo, bo, &cache->time_list,
time_list) {
vc4_bo_remove_from_cache(cache, bo);
@@ -322,7 +322,7 @@ vc4_bo_open_handle(struct vc4_screen *screen,
assert(size);
- pipe_mutex_lock(screen->bo_handles_mutex);
+ mtx_lock(&screen->bo_handles_mutex);
bo = util_hash_table_get(screen->bo_handles, (void*)(uintptr_t)handle);
if (bo) {
@@ -401,7 +401,7 @@ vc4_bo_get_dmabuf(struct vc4_bo *bo)
return -1;
}
- pipe_mutex_lock(bo->screen->bo_handles_mutex);
+ mtx_lock(&bo->screen->bo_handles_mutex);
bo->private = false;
util_hash_table_set(bo->screen->bo_handles, (void *)(uintptr_t)bo->handle, bo);
pipe_mutex_unlock(bo->screen->bo_handles_mutex);
diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.h b/src/gallium/drivers/vc4/vc4_bufmgr.h
index bcabfd2b971..e996d0cadac 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.h
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.h
@@ -93,7 +93,7 @@ vc4_bo_unreference(struct vc4_bo **bo)
vc4_bo_last_unreference(*bo);
} else {
screen = (*bo)->screen;
- pipe_mutex_lock(screen->bo_handles_mutex);
+ mtx_lock(&screen->bo_handles_mutex);
if (pipe_reference(&(*bo)->reference, NULL)) {
util_hash_table_remove(screen->bo_handles,