/* Return the number of CPU metrics we support. */
mtx_lock(&gcpufreq_mutex);
if (gcpufreq_count) {
- pipe_mutex_unlock(gcpufreq_mutex);
+ mtx_unlock(&gcpufreq_mutex);
return gcpufreq_count;
}
list_inithead(&gcpufreq_list);
DIR *dir = opendir("/sys/devices/system/cpu");
if (!dir) {
- pipe_mutex_unlock(gcpufreq_mutex);
+ mtx_unlock(&gcpufreq_mutex);
return 0;
}
}
}
- pipe_mutex_unlock(gcpufreq_mutex);
+ mtx_unlock(&gcpufreq_mutex);
return gcpufreq_count;
}
/* Return the number of block devices and partitions. */
mtx_lock(&gdiskstat_mutex);
if (gdiskstat_count) {
- pipe_mutex_unlock(gdiskstat_mutex);
+ mtx_unlock(&gdiskstat_mutex);
return gdiskstat_count;
}
list_inithead(&gdiskstat_list);
DIR *dir = opendir("/sys/block/");
if (!dir) {
- pipe_mutex_unlock(gdiskstat_mutex);
+ mtx_unlock(&gdiskstat_mutex);
return 0;
}
struct dirent *dpart;
DIR *pdir = opendir(basename);
if (!pdir) {
- pipe_mutex_unlock(gdiskstat_mutex);
+ mtx_unlock(&gdiskstat_mutex);
closedir(dir);
return 0;
}
puts(line);
}
}
- pipe_mutex_unlock(gdiskstat_mutex);
+ mtx_unlock(&gdiskstat_mutex);
return gdiskstat_count;
}
/* Return the number if network interfaces. */
mtx_lock(&gnic_mutex);
if (gnic_count) {
- pipe_mutex_unlock(gnic_mutex);
+ mtx_unlock(&gnic_mutex);
return gnic_count;
}
list_inithead(&gnic_list);
DIR *dir = opendir("/sys/class/net/");
if (!dir) {
- pipe_mutex_unlock(gnic_mutex);
+ mtx_unlock(&gnic_mutex);
return 0;
}
}
- pipe_mutex_unlock(gnic_mutex);
+ mtx_unlock(&gnic_mutex);
return gnic_count;
}
/* Return the number of sensors detected. */
mtx_lock(&gsensor_temp_mutex);
if (gsensors_temp_count) {
- pipe_mutex_unlock(gsensor_temp_mutex);
+ mtx_unlock(&gsensor_temp_mutex);
return gsensors_temp_count;
}
int ret = sensors_init(NULL);
if (ret) {
- pipe_mutex_unlock(gsensor_temp_mutex);
+ mtx_unlock(&gsensor_temp_mutex);
return 0;
}
}
}
- pipe_mutex_unlock(gsensor_temp_mutex);
+ mtx_unlock(&gsensor_temp_mutex);
return gsensors_temp_count;
}
return 0;
}
-#define pipe_mutex_unlock(mutex) \
- (void) mtx_unlock(&(mutex))
-
#define pipe_mutex_assert_locked(mutex) \
__pipe_mutex_assert_locked(&(mutex))
cnd_broadcast(&barrier->condvar);
}
- pipe_mutex_unlock(barrier->mutex);
+ mtx_unlock(&barrier->mutex);
}
mtx_lock(&sema->mutex);
sema->counter++;
cnd_signal(&sema->cond);
- pipe_mutex_unlock(sema->mutex);
+ mtx_unlock(&sema->mutex);
}
/** Wait for semaphore counter to be greater than zero */
cnd_wait(&sema->cond, &sema->mutex);
}
sema->counter--;
- pipe_mutex_unlock(sema->mutex);
+ mtx_unlock(&sema->mutex);
}
ops->fence_reference(ops, &fence, fenced_buf->fence);
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
finished = ops->fence_finish(ops, fenced_buf->fence, 0);
fenced_buffer_destroy_locked(fenced_mgr, fenced_buf);
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
}
done:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return map;
}
fenced_buf->flags &= ~PB_USAGE_CPU_READ_WRITE;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
fenced_buf->validation_flags |= flags;
done:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return ret;
}
fenced_buf->validation_flags = 0;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
*offset = 0;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
LIST_ADDTAIL(&fenced_buf->head, &fenced_mgr->unfenced);
++fenced_mgr->num_unfenced;
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return &fenced_buf->base;
no_storage:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
FREE(fenced_buf);
no_buffer:
return NULL;
mtx_lock(&fenced_mgr->mutex);
while (fenced_manager_check_signalled_locked(fenced_mgr, TRUE))
;
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
assert(fenced_mgr->provider->flush);
if (fenced_mgr->provider->flush)
/* Wait on outstanding fences. */
while (fenced_mgr->num_fenced) {
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
sched_yield();
#endif
/* assert(!fenced_mgr->num_unfenced); */
#endif
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
mtx_destroy(&fenced_mgr->mutex);
if (fenced_mgr->provider)
mtx_lock(&mgr->mutex);
LIST_DEL(&buf->head);
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
mtx_destroy(&buf->mutex);
mtx_lock(&buf->mutex);
++buf->map_count;
debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
- pipe_mutex_unlock(buf->mutex);
+ mtx_unlock(&buf->mutex);
return (uint8_t *)map + buf->underflow_size;
}
assert(buf->map_count);
if(buf->map_count)
--buf->map_count;
- pipe_mutex_unlock(buf->mutex);
+ mtx_unlock(&buf->mutex);
pb_unmap(buf->buffer);
debug_printf("last map backtrace is\n");
debug_backtrace_dump(buf->map_backtrace, PB_DEBUG_MAP_BACKTRACE);
}
- pipe_mutex_unlock(buf->mutex);
+ mtx_unlock(&buf->mutex);
pb_debug_buffer_check(buf);
debug_printf("%s: failed to create buffer\n", __FUNCTION__);
if(!LIST_IS_EMPTY(&mgr->list))
pb_debug_manager_dump_locked(mgr);
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
#endif
return NULL;
}
mtx_lock(&mgr->mutex);
LIST_ADDTAIL(&buf->head, &mgr->list);
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
return &buf->base;
}
debug_printf("%s: unfreed buffers\n", __FUNCTION__);
pb_debug_manager_dump_locked(mgr);
}
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
mtx_destroy(&mgr->mutex);
mgr->provider->destroy(mgr->provider);
mtx_lock(&mm->mutex);
u_mmFreeMem(mm_buf->block);
FREE(mm_buf);
- pipe_mutex_unlock(mm->mutex);
+ mtx_unlock(&mm->mutex);
}
mm_buf = CALLOC_STRUCT(mm_buffer);
if (!mm_buf) {
- pipe_mutex_unlock(mm->mutex);
+ mtx_unlock(&mm->mutex);
return NULL;
}
mmDumpMemInfo(mm->heap);
#endif
FREE(mm_buf);
- pipe_mutex_unlock(mm->mutex);
+ mtx_unlock(&mm->mutex);
return NULL;
}
assert(0 <= (pb_size)mm_buf->block->ofs && (pb_size)mm_buf->block->ofs < mm->size);
assert(size <= (pb_size)mm_buf->block->size && (pb_size)mm_buf->block->ofs + (pb_size)mm_buf->block->size <= mm->size);
- pipe_mutex_unlock(mm->mutex);
+ mtx_unlock(&mm->mutex);
return SUPER(mm_buf);
}
pb_unmap(mm->buffer);
pb_reference(&mm->buffer, NULL);
- pipe_mutex_unlock(mm->mutex);
+ mtx_unlock(&mm->mutex);
FREE(mgr);
}
mtx_lock(&pool->mutex);
LIST_ADD(&pool_buf->head, &pool->free);
pool->numFree++;
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
}
mtx_lock(&pool->mutex);
map = (unsigned char *) pool->map + pool_buf->start;
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
return map;
}
mtx_lock(&pool->mutex);
if (pool->numFree == 0) {
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
debug_printf("warning: out of fixed size buffer objects\n");
return NULL;
}
item = pool->free.next;
if (item == &pool->free) {
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
debug_printf("error: fixed size buffer pool corruption\n");
return NULL;
}
LIST_DEL(item);
--pool->numFree;
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
pool_buf = LIST_ENTRY(struct pool_buffer, item, head);
assert(!pipe_is_referenced(&pool_buf->base.reference));
pb_unmap(pool->buffer);
pb_reference(&pool->buffer, NULL);
- pipe_mutex_unlock(pool->mutex);
+ mtx_unlock(&pool->mutex);
FREE(mgr);
}
FREE(slab);
}
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
}
if (mgr->slabs.next == &mgr->slabs) {
(void) pb_slab_create(mgr);
if (mgr->slabs.next == &mgr->slabs) {
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
return NULL;
}
}
list = slab->freeBuffers.next;
LIST_DELINIT(list);
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
buf = LIST_ENTRY(struct pb_slab_buffer, list, head);
pipe_reference_init(&buf->base.reference, 1);
/* Directly release any buffer that exceeds the limit. */
if (mgr->cache_size + buf->size > mgr->max_cache_size) {
mgr->destroy_buffer(buf);
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
return;
}
LIST_ADDTAIL(&entry->head, cache);
++mgr->num_buffers;
mgr->cache_size += buf->size;
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
}
/**
mgr->cache_size -= buf->size;
LIST_DEL(&entry->head);
--mgr->num_buffers;
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
/* Increase refcount */
pipe_reference_init(&buf->reference, 1);
return buf;
}
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
return NULL;
}
next = curr->next;
}
}
- pipe_mutex_unlock(mgr->mutex);
+ mtx_unlock(&mgr->mutex);
}
void
* There's a chance that racing threads will end up allocating multiple
* slabs for the same group, but that doesn't hurt correctness.
*/
- pipe_mutex_unlock(slabs->mutex);
+ mtx_unlock(&slabs->mutex);
slab = slabs->slab_alloc(slabs->priv, heap, 1 << order, group_index);
if (!slab)
return NULL;
LIST_DEL(&entry->head);
slab->num_free--;
- pipe_mutex_unlock(slabs->mutex);
+ mtx_unlock(&slabs->mutex);
return entry;
}
{
mtx_lock(&slabs->mutex);
LIST_ADDTAIL(&entry->head, &slabs->reclaim);
- pipe_mutex_unlock(slabs->mutex);
+ mtx_unlock(&slabs->mutex);
}
/* Check if any of the entries handed to pb_slab_free are ready to be re-used.
{
mtx_lock(&slabs->mutex);
pb_slabs_reclaim_locked(slabs);
- pipe_mutex_unlock(slabs->mutex);
+ mtx_unlock(&slabs->mutex);
}
/* Initialize the slabs manager.
debug_printf("rtasm_exec_malloc failed\n");
bail:
- pipe_mutex_unlock(exec_mutex);
+ mtx_unlock(&exec_mutex);
return addr;
}
u_mmFreeMem(block);
}
- pipe_mutex_unlock(exec_mutex);
+ mtx_unlock(&exec_mutex);
}
fctx->bt_depth = bt_depth;
mtx_lock(&list_mutex);
list_addtail(&fctx->head, &ctx_list);
- pipe_mutex_unlock(list_mutex);
+ mtx_unlock(&list_mutex);
return fctx;
}
fbuf->map_frame = debug_flush_capture_frame(1, fbuf->bt_depth);
fbuf->mapped = TRUE;
- pipe_mutex_unlock(fbuf->mutex);
+ mtx_unlock(&fbuf->mutex);
if (mapped_sync) {
struct debug_flush_ctx *fctx;
FALSE, FALSE, item->ref_frame);
}
}
- pipe_mutex_unlock(list_mutex);
+ mtx_unlock(&list_mutex);
}
}
fbuf->mapped = FALSE;
FREE(fbuf->map_frame);
fbuf->map_frame = NULL;
- pipe_mutex_unlock(fbuf->mutex);
+ mtx_unlock(&fbuf->mutex);
}
void
debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, FALSE,
FALSE, fbuf->map_frame);
}
- pipe_mutex_unlock(fbuf->mutex);
+ mtx_unlock(&fbuf->mutex);
if (!item) {
item = CALLOC_STRUCT(debug_flush_item);
debug_flush_alert(NULL, "First reference", 0, item->bt_depth, FALSE,
FALSE, item->ref_frame);
}
- pipe_mutex_unlock(fbuf->mutex);
+ mtx_unlock(&fbuf->mutex);
return PIPE_OK;
}
mtx_lock(&list_mutex);
LIST_ADDTAIL(&hdr->head, &list);
- pipe_mutex_unlock(list_mutex);
+ mtx_unlock(&list_mutex);
return data_from_header(hdr);
}
#else
mtx_lock(&list_mutex);
LIST_DEL(&hdr->head);
- pipe_mutex_unlock(list_mutex);
+ mtx_unlock(&list_mutex);
hdr->magic = 0;
ftr->magic = 0;
mtx_lock(&list_mutex);
LIST_REPLACE(&old_hdr->head, &new_hdr->head);
- pipe_mutex_unlock(list_mutex);
+ mtx_unlock(&list_mutex);
/* copy data */
new_ptr = data_from_header(new_hdr);
util_hash_table_set(serials_hash, p, (void *) (uintptr_t) serial);
found = FALSE;
}
- pipe_mutex_unlock(serials_mutex);
+ mtx_unlock(&serials_mutex);
*pserial = serial;
{
mtx_lock(&serials_mutex);
util_hash_table_remove(serials_hash, p);
- pipe_mutex_unlock(serials_mutex);
+ mtx_unlock(&serials_mutex);
}
util_hash_table_set(symbols_hash, (void*)addr, (void*)name);
}
- pipe_mutex_unlock(symbols_mutex);
+ mtx_unlock(&symbols_mutex);
return name;
}
LIST_FOR_EACH_ENTRY(iter, &queue_list, head) {
util_queue_killall_and_wait(iter);
}
- pipe_mutex_unlock(exit_mutex);
+ mtx_unlock(&exit_mutex);
}
static void
mtx_lock(&exit_mutex);
LIST_ADD(&queue->head, &queue_list);
- pipe_mutex_unlock(exit_mutex);
+ mtx_unlock(&exit_mutex);
}
static void
break;
}
}
- pipe_mutex_unlock(exit_mutex);
+ mtx_unlock(&exit_mutex);
}
/****************************************************************************
mtx_lock(&fence->mutex);
fence->signalled = true;
cnd_broadcast(&fence->cond);
- pipe_mutex_unlock(fence->mutex);
+ mtx_unlock(&fence->mutex);
}
void
mtx_lock(&fence->mutex);
while (!fence->signalled)
cnd_wait(&fence->cond, &fence->mutex);
- pipe_mutex_unlock(fence->mutex);
+ mtx_unlock(&fence->mutex);
}
void
cnd_wait(&queue->has_queued_cond, &queue->lock);
if (queue->kill_threads) {
- pipe_mutex_unlock(queue->lock);
+ mtx_unlock(&queue->lock);
break;
}
queue->num_queued--;
cnd_signal(&queue->has_space_cond);
- pipe_mutex_unlock(queue->lock);
+ mtx_unlock(&queue->lock);
if (job.job) {
job.execute(job.job, thread_index);
queue->read_idx = (queue->read_idx + 1) % queue->max_jobs;
}
queue->num_queued = 0; /* reset this when exiting the thread */
- pipe_mutex_unlock(queue->lock);
+ mtx_unlock(&queue->lock);
return 0;
}
mtx_lock(&queue->lock);
queue->kill_threads = 1;
cnd_broadcast(&queue->has_queued_cond);
- pipe_mutex_unlock(queue->lock);
+ mtx_unlock(&queue->lock);
for (i = 0; i < queue->num_threads; i++)
pipe_thread_wait(queue->threads[i]);
queue->num_queued++;
cnd_signal(&queue->has_queued_cond);
- pipe_mutex_unlock(queue->lock);
+ mtx_unlock(&queue->lock);
}
int64_t
mtx_lock(&range->write_mutex);
range->start = MIN2(start, range->start);
range->end = MAX2(end, range->end);
- pipe_mutex_unlock(range->write_mutex);
+ mtx_unlock(&range->write_mutex);
}
}
/* Signal change:
*/
cnd_signal(&ring->change);
- pipe_mutex_unlock(ring->mutex);
+ mtx_unlock(&ring->mutex);
}
enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring,
/* Signal change:
*/
cnd_signal(&ring->change);
- pipe_mutex_unlock(ring->mutex);
+ mtx_unlock(&ring->mutex);
return ret;
}
if (dctx->thread) {
mtx_lock(&dctx->mutex);
dctx->kill_thread = 1;
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
pipe_thread_wait(dctx->thread);
mtx_destroy(&dctx->mutex);
assert(!dctx->records);
}
/* Unlock and sleep before starting all over again. */
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
os_time_sleep(10000); /* 10 ms */
mtx_lock(&dctx->mutex);
}
while (dctx->records)
dd_free_record(&dctx->records);
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
return 0;
}
mtx_lock(&dctx->mutex);
record->next = dctx->records;
dctx->records = record;
- pipe_mutex_unlock(dctx->mutex);
+ mtx_unlock(&dctx->mutex);
}
static void
{
mtx_lock(&batch->ctx->screen->lock);
batch_reset_resources_locked(batch);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
}
static void
mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, true);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
batch_fini(batch);
} else {
mtx_lock(&batch->ctx->screen->lock);
fd_bc_invalidate_batch(batch, false);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
}
}
*/
if (batch_depends_on(dep, batch)) {
DBG("%p: flush forced on %p!", batch, dep);
- pipe_mutex_unlock(batch->ctx->screen->lock);
+ mtx_unlock(&batch->ctx->screen->lock);
fd_batch_flush(dep, false);
mtx_lock(&batch->ctx->screen->lock);
} else {
struct fd_batch *batch = NULL;
fd_batch_reference_locked(&batch, (struct fd_batch *)entry->data);
if (batch->ctx == ctx) {
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
fd_batch_reference(&last_batch, batch);
fd_batch_flush(batch, false);
mtx_lock(&ctx->screen->lock);
fd_batch_reference_locked(&batch, NULL);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
if (last_batch) {
fd_batch_sync(last_batch);
fd_batch_reference_locked(&batch, NULL);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
}
void
rsc->bc_batch_mask = 0;
- pipe_mutex_unlock(screen->lock);
+ mtx_unlock(&screen->lock);
}
struct fd_batch *
/* we can drop lock temporarily here, since we hold a ref,
* flush_batch won't disappear under us.
*/
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
DBG("%p: too many batches! flush forced!", flush_batch);
fd_batch_flush(flush_batch, true);
mtx_lock(&ctx->screen->lock);
cache->batches[idx] = batch;
out:
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
return batch;
}
rsc->bc_batch_mask = (1 << batch->idx);
}
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
return batch;
}
static inline void
fd_context_unlock(struct fd_context *ctx)
{
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
}
static inline struct pipe_scissor_state *
resource_written(batch, batch->query_buf);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
batch->num_draws++;
resource_written(batch, batch->query_buf);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers,
pfb->width, pfb->height, depth, stencil,
}
swap(rsc->batch_mask, shadow->batch_mask);
- pipe_mutex_unlock(ctx->screen->lock);
+ mtx_unlock(&ctx->screen->lock);
struct pipe_blit_info blit = {0};
blit.dst.resource = prsc;
*/
cnd_broadcast(&fence->signalled);
- pipe_mutex_unlock(fence->mutex);
+ mtx_unlock(&fence->mutex);
}
boolean
while (f->count < f->rank) {
cnd_wait(&f->signalled, &f->mutex);
}
- pipe_mutex_unlock(f->mutex);
+ mtx_unlock(&f->mutex);
}
end:
/*printf("return bin %p at %d, %d\n", (void *) bin, *bin_x, *bin_y);*/
- pipe_mutex_unlock(scene->mutex);
+ mtx_unlock(&scene->mutex);
return bin;
}
*/
lp_rast_queue_scene(screen->rast, scene);
lp_rast_finish(screen->rast);
- pipe_mutex_unlock(screen->rast_mutex);
+ mtx_unlock(&screen->rast_mutex);
lp_scene_end_rasterization(setup->scene);
lp_setup_reset( setup );
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nv50->base.pipe, mode, ptarg);
- pipe_mutex_unlock(blitter->mutex);
+ mtx_unlock(&blitter->mutex);
}
ctx->fp = blitter->fp[targ][mode];
}
if (!blitter->fp[targ][mode])
blitter->fp[targ][mode] =
nv50_blitter_make_fp(&ctx->nvc0->base.pipe, mode, ptarg);
- pipe_mutex_unlock(blitter->mutex);
+ mtx_unlock(&blitter->mutex);
}
ctx->fp = blitter->fp[targ][mode];
}
* Then in texture_destroy, we set cmask_resource to NULL. */
r300->screen->cmask_resource = fb->cbufs[0]->texture;
}
- pipe_mutex_unlock(r300->screen->cmask_mutex);
+ mtx_unlock(&r300->screen->cmask_mutex);
}
if (r300->screen->cmask_resource == fb->cbufs[0]->texture) {
if (texture == rscreen->cmask_resource) {
rscreen->cmask_resource = NULL;
}
- pipe_mutex_unlock(rscreen->cmask_mutex);
+ mtx_unlock(&rscreen->cmask_mutex);
}
pb_reference(&tex->buf, NULL);
FREE(tex);
if (!rscreen->gpu_load_thread)
rscreen->gpu_load_thread =
pipe_thread_create(r600_gpu_load_thread, rscreen);
- pipe_mutex_unlock(rscreen->gpu_load_mutex);
+ mtx_unlock(&rscreen->gpu_load_mutex);
}
unsigned busy = p_atomic_read(&rscreen->mmio_counters.array[busy_index]);
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);
+ mtx_unlock(&rscreen->aux_context_lock);
}
ctx->flush(ctx, NULL, 0);
if (ctx == rscreen->aux_context)
- pipe_mutex_unlock(rscreen->aux_context_lock);
+ mtx_unlock(&rscreen->aux_context_lock);
}
static void r600_texture_discard_cmask(struct r600_common_screen *rscreen,
rctx->b.flush(&rctx->b, NULL, 0);
if (&rctx->b == rscreen->aux_context)
- pipe_mutex_unlock(rscreen->aux_context_lock);
+ mtx_unlock(&rscreen->aux_context_lock);
return r600_texture_discard_dcc(rscreen, rtex);
}
/* Find existing. */
for (result = *list; result; result = result->next) {
if (memcmp(&result->key, key, sizeof(*key)) == 0) {
- pipe_mutex_unlock(sscreen->shader_parts_mutex);
+ mtx_unlock(&sscreen->shader_parts_mutex);
return result;
}
}
out:
si_llvm_dispose(&ctx);
- pipe_mutex_unlock(sscreen->shader_parts_mutex);
+ mtx_unlock(&sscreen->shader_parts_mutex);
return result;
}
if (iter->is_optimized &&
!util_queue_fence_is_signalled(&iter->optimized_ready)) {
memset(&key->opt, 0, sizeof(key->opt));
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
goto again;
}
if (iter->compilation_failed) {
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -1; /* skip the draw call */
}
state->current = iter;
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return 0;
}
}
/* Build a new shader. */
shader = CALLOC_STRUCT(si_shader);
if (!shader) {
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM;
}
shader->selector = sel;
if (!main_part) {
FREE(shader);
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM; /* skip the draw call */
}
&compiler_state->debug) != 0) {
FREE(main_part);
FREE(shader);
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return -ENOMEM; /* skip the draw call */
}
*mainp = main_part;
/* Use the default (unoptimized) shader for now. */
memset(&key->opt, 0, sizeof(key->opt));
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
goto again;
}
if (!shader->compilation_failed)
state->current = shader;
- pipe_mutex_unlock(sel->mutex);
+ mtx_unlock(&sel->mutex);
return shader->compilation_failed ? -1 : 0;
}
if (tgsi_binary &&
si_shader_cache_load_shader(sscreen, tgsi_binary, shader)) {
- pipe_mutex_unlock(sscreen->shader_cache_mutex);
+ mtx_unlock(&sscreen->shader_cache_mutex);
} else {
- pipe_mutex_unlock(sscreen->shader_cache_mutex);
+ mtx_unlock(&sscreen->shader_cache_mutex);
/* Compile the shader if it hasn't been loaded from the cache. */
if (si_compile_tgsi_shader(sscreen, tm, shader, false,
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);
+ mtx_unlock(&sscreen->shader_cache_mutex);
}
}
mtx_lock(&rb_pipe->call_mutex);
pipe->destroy(pipe);
rb_pipe->pipe = NULL;
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
FREE(rb_pipe);
}
!(rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY] && rb_pipe->curr.shader[PIPE_SHADER_GEOMETRY]->disabled) &&
!(rb_pipe->curr.shader[PIPE_SHADER_VERTEX] && rb_pipe->curr.shader[PIPE_SHADER_VERTEX]->disabled))
pipe->draw_vbo(pipe, info);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
- pipe_mutex_unlock(rb_pipe->draw_mutex);
+ mtx_unlock(&rb_pipe->draw_mutex);
}
static struct pipe_query *
query = pipe->create_query(pipe,
query_type,
index);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return query;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->destroy_query(pipe,
query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static boolean
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->begin_query(pipe, query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->end_query(pipe,
query);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
query,
wait,
result);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->set_active_query_state(pipe, enable);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_blend_state(pipe,
blend);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_sampler_state(pipe,
sampler);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_sampler_states(pipe, shader, start, count, samplers);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_sampler_state(pipe,
sampler);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_rasterizer_state(pipe,
rasterizer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
ret = pipe->create_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_depth_stencil_alpha_state(pipe,
depth_stencil_alpha);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_fs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
pipe->bind_fs_state(pipe,
fs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_vs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
pipe->bind_vs_state(pipe,
vs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct rbug_shader *rb_shader = rbug_shader(_vs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
mtx_lock(&rb_pipe->call_mutex);
result = pipe->create_gs_state(pipe, state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (!result)
return NULL;
pipe->bind_gs_state(pipe,
gs);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
rbug_shader_destroy(rb_pipe, rb_shader);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void *
ret = pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
return ret;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->bind_vertex_elements_state(pipe,
velems);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->delete_vertex_elements_state(pipe,
velems);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_blend_color(pipe,
blend_color);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_stencil_ref(pipe,
stencil_ref);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_clip_state(pipe,
clip);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
shader,
index,
_cb ? &cb : NULL);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
pipe->set_framebuffer_state(pipe,
state);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_polygon_stipple(pipe,
poly_stipple);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_scissor_states(pipe, start_slot, num_scissors, scissor);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_viewport_states(pipe, start_slot, num_viewports, viewport);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
pipe->set_sampler_views(pipe, shader, start, num, views);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
num_buffers,
buffers);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_index_buffer(pipe, ib);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_sample_mask(pipe, sample_mask);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static struct pipe_stream_output_target *
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);
+ mtx_unlock(&rb_pipe->call_mutex);
return target;
}
mtx_lock(&rb_pipe->call_mutex);
pipe->stream_output_target_destroy(pipe, target);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->set_stream_output_targets(pipe, num_targets, targets, offsets);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
src,
src_level,
src_box);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->blit(pipe, &blit_info);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->flush_resource(pipe, res);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
color,
depth,
stencil);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
width,
height,
render_condition_enabled);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
width,
height,
render_condition_enabled);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static void
mtx_lock(&rb_pipe->call_mutex);
pipe->flush(pipe, fence, flags);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
static struct pipe_sampler_view *
result = pipe->create_sampler_view(pipe,
resource,
templ);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (result)
return rbug_sampler_view_create(rb_pipe, rb_resource, result);
result = pipe->create_surface(pipe,
resource,
surf_tmpl);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
if (result)
return rbug_surface_create(rb_pipe, rb_resource, result);
mtx_lock(&rb_pipe->call_mutex);
rbug_surface_destroy(rb_pipe,
rb_surface);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
level,
usage,
box, &result);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
*transfer = rbug_transfer_create(rb_pipe, rb_resource, result);
return *transfer ? map : NULL;
context->transfer_flush_region(context,
transfer,
box);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
transfer);
rbug_transfer_destroy(rb_pipe,
rb_transfer);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&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);
+ mtx_unlock(&rb_pipe->call_mutex);
}
data,
stride,
layer_stride);
- pipe_mutex_unlock(rb_pipe->call_mutex);
+ mtx_unlock(&rb_pipe->call_mutex);
}
tr_tex = container_of(ptr, struct rbug_resource, list);
texs[i++] = VOID2U64(tr_tex);
}
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_texture_list_reply(tr_rbug->con, serial, texs, i, NULL);
FREE(texs);
}
if (!tr_tex) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
t->bind,
NULL);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
}
if (!tr_tex) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
context->transfer_unmap(context, t);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = container_of(ptr, struct rbug_context, list);
ctxs[i++] = VOID2U64(rb_context);
}
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_context_list_reply(tr_rbug->con, serial, ctxs, i, NULL);
FREE(ctxs);
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
VOID2U64(rb_context->curr.zsbuf),
rb_context->draw_blocker, rb_context->draw_blocked, NULL);
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->draw_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, block->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
mtx_lock(&rb_context->draw_mutex);
rb_context->draw_blocker |= block->block;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, step->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
} else {
rb_context->draw_blocked &= ~step->step;
}
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, unblock->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
rb_context->draw_blocked &= ~unblock->unblock;
}
rb_context->draw_blocker &= ~unblock->unblock;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, rule->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
rb_context->draw_rule.surf = U642VOID(rule->surface);
rb_context->draw_rule.blocker = rule->block;
rb_context->draw_blocker |= RBUG_BLOCK_RULE;
- pipe_mutex_unlock(rb_context->draw_mutex);
+ mtx_unlock(&rb_context->draw_mutex);
cnd_broadcast(&rb_context->draw_cond);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, flush->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
rb_context->pipe->flush(rb_context->pipe, NULL, 0);
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, list->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
shdrs[i++] = VOID2U64(tr_shdr);
}
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
rbug_send_shader_list_reply(tr_rbug->con, serial, shdrs, i, NULL);
FREE(shdrs);
rb_context = rbug_get_context_locked(rb_screen, info->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr = rbug_get_shader_locked(rb_context, info->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr->disabled,
NULL);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, dis->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr = rbug_get_shader_locked(rb_context, dis->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr->disabled = dis->disable;
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
}
rb_context = rbug_get_context_locked(rb_screen, rep->context);
if (!rb_context) {
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr = rbug_get_shader_locked(rb_context, rep->shader);
if (!tr_shdr) {
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -ESRCH;
}
tr_shdr->replaced_shader = state;
out:
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return 0;
tr_shdr->replaced_shader = NULL;
tr_shdr->replaced_tokens = NULL;
- pipe_mutex_unlock(rb_context->call_mutex);
- pipe_mutex_unlock(rb_context->list_mutex);
- pipe_mutex_unlock(rb_screen->list_mutex);
+ mtx_unlock(&rb_context->call_mutex);
+ mtx_unlock(&rb_context->list_mutex);
+ mtx_unlock(&rb_screen->list_mutex);
return -EINVAL;
}
mtx_lock(&scr->list_mutex); \
insert_at_head(&scr->name, &obj->list); \
scr->num_##name++; \
- pipe_mutex_unlock(scr->list_mutex); \
+ mtx_unlock(&scr->list_mutex); \
} while (0)
#define rbug_screen_remove_from_list(scr, name, obj) \
mtx_lock(&scr->list_mutex); \
remove_from_list(&obj->list); \
scr->num_##name--; \
- pipe_mutex_unlock(scr->list_mutex); \
+ mtx_unlock(&scr->list_mutex); \
} while (0)
mtx_lock(&ss->swc_mutex);
svga_buffer_add_range(sbuf, offset, offset + length);
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
}
}
}
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
FREE(transfer);
SVGA_STATS_TIME_POP(svga_sws(svga));
}
assert(map);
assert(!retry);
if (!map) {
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
svga_buffer_destroy_hw_storage(ss, sbuf);
return PIPE_ERROR;
}
sbuf->swbuf = NULL;
}
- pipe_mutex_unlock(ss->swc_mutex);
+ mtx_unlock(&ss->swc_mutex);
}
return PIPE_OK;
tex->cached_view->min_lod == min_lod &&
tex->cached_view->max_lod == max_lod) {
svga_sampler_view_reference(&sv, tex->cached_view);
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
SVGA_DBG(DEBUG_VIEWS, "svga: Sampler view: reuse %p, %u %u, last %u\n",
pt, min_lod, max_lod, pt->last_level);
svga_validate_sampler_view(svga_context(pipe), sv);
return sv;
}
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
}
sv = CALLOC_STRUCT(svga_sampler_view);
mtx_lock(&ss->tex_mutex);
svga_sampler_view_reference(&tex->cached_view, sv);
- pipe_mutex_unlock(ss->tex_mutex);
+ mtx_unlock(&ss->tex_mutex);
debug_reference(&sv->reference,
(debug_reference_descriptor)
next = curr->next;
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
if (SVGA_DEBUG & DEBUG_DMA)
debug_printf("%s: cache %s after %u tries (bucket %d)\n", __FUNCTION__,
if (surf_size >= SVGA_HOST_SURFACE_CACHE_BYTES) {
/* this surface is too large to cache, just free it */
sws->surface_reference(sws, &handle, NULL);
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
return;
}
* just discard this surface.
*/
sws->surface_reference(sws, &handle, NULL);
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
return;
}
}
sws->surface_reference(sws, &handle, NULL);
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
}
next = curr->next;
}
- pipe_mutex_unlock(cache->mutex);
+ mtx_unlock(&cache->mutex);
}
void trace_dump_call_unlock(void)
{
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
/*
{
mtx_lock(&call_mutex);
trace_dumping_start_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
void trace_dumping_stop(void)
{
mtx_lock(&call_mutex);
trace_dumping_stop_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
boolean trace_dumping_enabled(void)
boolean ret;
mtx_lock(&call_mutex);
ret = trace_dumping_enabled_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
return ret;
}
void trace_dump_call_end(void)
{
trace_dump_call_end_locked();
- pipe_mutex_unlock(call_mutex);
+ mtx_unlock(&call_mutex);
}
void trace_dump_arg_begin(const char *name)
* user will proceed to CPU map it and fill it with stuff.
*/
if (!vc4_bo_wait(bo, 0, NULL)) {
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
return NULL;
}
bo->name = name;
}
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
return bo;
}
clock_gettime(CLOCK_MONOTONIC, &time);
mtx_lock(&screen->bo_cache.lock);
vc4_bo_last_unreference_locked_timed(bo, time.tv_sec);
- pipe_mutex_unlock(screen->bo_cache.lock);
+ mtx_unlock(&screen->bo_cache.lock);
}
static void
vc4_bo_remove_from_cache(cache, bo);
vc4_bo_free(bo);
}
- pipe_mutex_unlock(cache->lock);
+ mtx_unlock(&cache->lock);
}
void
util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);
done:
- pipe_mutex_unlock(screen->bo_handles_mutex);
+ mtx_unlock(&screen->bo_handles_mutex);
return bo;
}
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);
+ mtx_unlock(&bo->screen->bo_handles_mutex);
return fd;
}
vc4_bo_last_unreference(*bo);
}
- pipe_mutex_unlock(screen->bo_handles_mutex);
+ mtx_unlock(&screen->bo_handles_mutex);
}
*bo = NULL;
mtx_lock(&screen->opencl_func_mutex);
if (dri2_is_opencl_interop_loaded_locked(screen)) {
- pipe_mutex_unlock(screen->opencl_func_mutex);
+ mtx_unlock(&screen->opencl_func_mutex);
return true;
}
dlsym(RTLD_DEFAULT, "opencl_dri_event_get_fence");
success = dri2_is_opencl_interop_loaded_locked(screen);
- pipe_mutex_unlock(screen->opencl_func_mutex);
+ mtx_unlock(&screen->opencl_func_mutex);
return success;
#else
return false;
while(info) {
if (info->display == display) {
/* Found it */
- pipe_mutex_unlock(init_mutex);
+ mtx_unlock(&init_mutex);
return &info->mesaDisplay;
}
info = info->next;
/* allocate mesa display info */
info = (XMesaExtDisplayInfo *) Xmalloc(sizeof(XMesaExtDisplayInfo));
if (info == NULL) {
- pipe_mutex_unlock(init_mutex);
+ mtx_unlock(&init_mutex);
return NULL;
}
info->display = display;
xmdpy->display = NULL;
}
- pipe_mutex_unlock(init_mutex);
+ mtx_unlock(&init_mutex);
return xmdpy;
}
mtx_lock(&xmdpy->mutex);
stat = get_drawable_size(dpy, b->ws.drawable, width, height);
- pipe_mutex_unlock(xmdpy->mutex);
+ mtx_unlock(&xmdpy->mutex);
if (!stat) {
/* probably querying a window that's recently been destroyed */
void
NineUnlockGlobalMutex()
{
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static HRESULT NINE_WINAPI
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineAuthenticatedChannel9_GetCertificateSize(This, pCertificateSize);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineAuthenticatedChannel9_GetCertificate(This, CertifacteSize, ppCertificate);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineAuthenticatedChannel9_NegotiateKeyExchange(This, DataSize, pData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineAuthenticatedChannel9_Query(This, InputSize, pInput, OutputSize, pOutput);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineAuthenticatedChannel9_Configure(This, InputSize, pInput, pOutput);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_SetPrivateData(This, refguid, pData, SizeOfData, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetPrivateData(This, refguid, pData, pSizeOfData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_FreePrivateData(This, refguid);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
DWORD r;
mtx_lock(&d3dlock_global);
r = NineResource9_SetPriority(This, PriorityNew);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
DWORD r;
mtx_lock(&d3dlock_global);
r = NineResource9_GetPriority(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
{
mtx_lock(&d3dlock_global);
NineResource9_PreLoad(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
#endif
D3DRESOURCETYPE r;
mtx_lock(&d3dlock_global);
r = NineResource9_GetType(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
DWORD r;
mtx_lock(&d3dlock_global);
r = NineBaseTexture9_SetLOD(This, LODNew);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
DWORD r;
mtx_lock(&d3dlock_global);
r = NineBaseTexture9_GetLOD(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
DWORD r;
mtx_lock(&d3dlock_global);
r = NineBaseTexture9_GetLevelCount(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineBaseTexture9_SetAutoGenFilterType(This, FilterType);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
D3DTEXTUREFILTERTYPE r;
mtx_lock(&d3dlock_global);
r = NineBaseTexture9_GetAutoGenFilterType(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
{
mtx_lock(&d3dlock_global);
NineBaseTexture9_PreLoad(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static void NINE_WINAPI
{
mtx_lock(&d3dlock_global);
NineBaseTexture9_GenerateMipSubLevels(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static HRESULT NINE_WINAPI
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_GetCertificateSize(This, pCertificateSize);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_GetCertificate(This, CertifacteSize, ppCertificate);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_NegotiateKeyExchange(This, DataSize, pData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_EncryptionBlt(This, pSrcSurface, pDstSurface, DstSurfaceSize, pIV);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_DecryptionBlt(This, pSrcSurface, pDstSurface, SrcSurfaceSize, pEncryptedBlockInfo, pContentKey, pIV);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_GetSurfacePitch(This, pSrcSurface, pSurfacePitch);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_StartSessionKeyRefresh(This, pRandomNumber, RandomNumberSize);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_FinishSessionKeyRefresh(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCryptoSession9_GetEncryptionBltKey(This, pReadbackKey, KeySize);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCubeTexture9_GetLevelDesc(This, Level, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCubeTexture9_GetCubeMapSurface(This, FaceType, Level, ppCubeMapSurface);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCubeTexture9_LockRect(This, FaceType, Level, pLockedRect, pRect, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCubeTexture9_UnlockRect(This, FaceType, Level);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineCubeTexture9_AddDirtyRect(This, FaceType, pDirtyRect);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_TestCooperativeLevel(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
UINT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetAvailableTextureMem(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_EvictManagedResources(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetDirect3D(This, ppD3D9);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetDeviceCaps(This, pCaps);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetDisplayMode(This, iSwapChain, pMode);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetCreationParameters(This, pParameters);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetCursorProperties(This, XHotSpot, YHotSpot, pCursorBitmap);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
{
mtx_lock(&d3dlock_global);
NineDevice9_SetCursorPosition(This, X, Y, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static BOOL NINE_WINAPI
BOOL r;
mtx_lock(&d3dlock_global);
r = NineDevice9_ShowCursor(This, bShow);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateAdditionalSwapChain(This, pPresentationParameters, pSwapChain);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetSwapChain(This, iSwapChain, pSwapChain);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
UINT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetNumberOfSwapChains(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_Reset(This, pPresentationParameters);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_Present(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetBackBuffer(This, iSwapChain, iBackBuffer, Type, ppBackBuffer);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetRasterStatus(This, iSwapChain, pRasterStatus);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetDialogBoxMode(This, bEnableDialogs);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
{
mtx_lock(&d3dlock_global);
NineDevice9_SetGammaRamp(This, iSwapChain, Flags, pRamp);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static void NINE_WINAPI
{
mtx_lock(&d3dlock_global);
NineDevice9_GetGammaRamp(This, iSwapChain, pRamp);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
}
static HRESULT NINE_WINAPI
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateTexture(This, Width, Height, Levels, Usage, Format, Pool, ppTexture, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateVolumeTexture(This, Width, Height, Depth, Levels, Usage, Format, Pool, ppVolumeTexture, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateCubeTexture(This, EdgeLength, Levels, Usage, Format, Pool, ppCubeTexture, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateVertexBuffer(This, Length, Usage, FVF, Pool, ppVertexBuffer, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateIndexBuffer(This, Length, Usage, Format, Pool, ppIndexBuffer, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateRenderTarget(This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateDepthStencilSurface(This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_UpdateSurface(This, pSourceSurface, pSourceRect, pDestinationSurface, pDestPoint);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_UpdateTexture(This, pSourceTexture, pDestinationTexture);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetRenderTargetData(This, pRenderTarget, pDestSurface);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetFrontBufferData(This, iSwapChain, pDestSurface);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_StretchRect(This, pSourceSurface, pSourceRect, pDestSurface, pDestRect, Filter);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_ColorFill(This, pSurface, pRect, color);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateOffscreenPlainSurface(This, Width, Height, Format, Pool, ppSurface, pSharedHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetRenderTarget(This, RenderTargetIndex, pRenderTarget);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetRenderTarget(This, RenderTargetIndex, ppRenderTarget);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetDepthStencilSurface(This, pNewZStencil);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetDepthStencilSurface(This, ppZStencilSurface);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_BeginScene(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_EndScene(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_Clear(This, Count, pRects, Flags, Color, Z, Stencil);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetTransform(This, State, pMatrix);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetTransform(This, State, pMatrix);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_MultiplyTransform(This, State, pMatrix);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetViewport(This, pViewport);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetViewport(This, pViewport);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetMaterial(This, pMaterial);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetMaterial(This, pMaterial);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetLight(This, Index, pLight);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetLight(This, Index, pLight);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_LightEnable(This, Index, Enable);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetLightEnable(This, Index, pEnable);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetClipPlane(This, Index, pPlane);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetClipPlane(This, Index, pPlane);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetRenderState(This, State, Value);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetRenderState(This, State, pValue);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateStateBlock(This, Type, ppSB);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_BeginStateBlock(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_EndStateBlock(This, ppSB);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetClipStatus(This, pClipStatus);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetClipStatus(This, pClipStatus);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetTexture(This, Stage, ppTexture);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetTexture(This, Stage, pTexture);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetTextureStageState(This, Stage, Type, pValue);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetTextureStageState(This, Stage, Type, Value);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetSamplerState(This, Sampler, Type, pValue);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetSamplerState(This, Sampler, Type, Value);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_ValidateDevice(This, pNumPasses);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetPaletteEntries(This, PaletteNumber, pEntries);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetPaletteEntries(This, PaletteNumber, pEntries);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetCurrentTexturePalette(This, PaletteNumber);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetCurrentTexturePalette(This, PaletteNumber);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetScissorRect(This, pRect);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetScissorRect(This, pRect);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetSoftwareVertexProcessing(This, bSoftware);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
BOOL r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetSoftwareVertexProcessing(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetNPatchMode(This, nSegments);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
float r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetNPatchMode(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawPrimitive(This, PrimitiveType, StartVertex, PrimitiveCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawIndexedPrimitive(This, PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawPrimitiveUP(This, PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawIndexedPrimitiveUP(This, PrimitiveType, MinVertexIndex, NumVertices, PrimitiveCount, pIndexData, IndexDataFormat, pVertexStreamZeroData, VertexStreamZeroStride);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_ProcessVertices(This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateVertexDeclaration(This, pVertexElements, ppDecl);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetVertexDeclaration(This, pDecl);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetVertexDeclaration(This, ppDecl);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetFVF(This, FVF);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetFVF(This, pFVF);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateVertexShader(This, pFunction, ppShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetVertexShader(This, pShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetVertexShader(This, ppShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetVertexShaderConstantF(This, StartRegister, pConstantData, Vector4fCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetVertexShaderConstantF(This, StartRegister, pConstantData, Vector4fCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetVertexShaderConstantI(This, StartRegister, pConstantData, Vector4iCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetVertexShaderConstantI(This, StartRegister, pConstantData, Vector4iCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetVertexShaderConstantB(This, StartRegister, pConstantData, BoolCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetVertexShaderConstantB(This, StartRegister, pConstantData, BoolCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetStreamSource(This, StreamNumber, pStreamData, OffsetInBytes, Stride);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetStreamSource(This, StreamNumber, ppStreamData, pOffsetInBytes, pStride);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetStreamSourceFreq(This, StreamNumber, Setting);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetStreamSourceFreq(This, StreamNumber, pSetting);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetIndices(This, pIndexData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetIndices(This, ppIndexData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreatePixelShader(This, pFunction, ppShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetPixelShader(This, pShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetPixelShader(This, ppShader);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetPixelShaderConstantF(This, StartRegister, pConstantData, Vector4fCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetPixelShaderConstantF(This, StartRegister, pConstantData, Vector4fCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetPixelShaderConstantI(This, StartRegister, pConstantData, Vector4iCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetPixelShaderConstantI(This, StartRegister, pConstantData, Vector4iCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_SetPixelShaderConstantB(This, StartRegister, pConstantData, BoolCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_GetPixelShaderConstantB(This, StartRegister, pConstantData, BoolCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawRectPatch(This, Handle, pNumSegs, pRectPatchInfo);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DrawTriPatch(This, Handle, pNumSegs, pTriPatchInfo);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_DeletePatch(This, Handle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9_CreateQuery(This, Type, ppQuery);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_SetConvolutionMonoKernel(This, width, height, rows, columns);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_ComposeRects(This, pSrc, pDst, pSrcRectDescs, NumRects, pDstRectDescs, Operation, Xoffset, Yoffset);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_PresentEx(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_GetGPUThreadPriority(This, pPriority);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_SetGPUThreadPriority(This, Priority);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_WaitForVBlank(This, iSwapChain);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_CheckResourceResidency(This, pResourceArray, NumResources);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_SetMaximumFrameLatency(This, MaxLatency);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_GetMaximumFrameLatency(This, pMaxLatency);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_CheckDeviceState(This, hDestinationWindow);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_CreateRenderTargetEx(This, Width, Height, Format, MultiSample, MultisampleQuality, Lockable, ppSurface, pSharedHandle, Usage);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_CreateOffscreenPlainSurfaceEx(This, Width, Height, Format, Pool, ppSurface, pSharedHandle, Usage);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_CreateDepthStencilSurfaceEx(This, Width, Height, Format, MultiSample, MultisampleQuality, Discard, ppSurface, pSharedHandle, Usage);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_ResetEx(This, pPresentationParameters, pFullscreenDisplayMode);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Ex_GetDisplayModeEx(This, iSwapChain, pMode, pRotation);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Video_GetContentProtectionCaps(This, pCryptoType, pDecodeProfile, pCaps);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Video_CreateAuthenticatedChannel(This, ChannelType, ppAuthenticatedChannel, pChannelHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineDevice9Video_CreateCryptoSession(This, pCryptoType, pDecodeProfile, ppCryptoSession, pCryptoHandle);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineIndexBuffer9_Lock(This, OffsetToLock, SizeToLock, ppbData, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineIndexBuffer9_Unlock(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineIndexBuffer9_GetDesc(This, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NinePixelShader9_GetFunction(This, pData, pSizeOfData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
D3DQUERYTYPE r;
mtx_lock(&d3dlock_global);
r = NineQuery9_GetType(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
DWORD r;
mtx_lock(&d3dlock_global);
r = NineQuery9_GetDataSize(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineQuery9_Issue(This, dwIssueFlags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineQuery9_GetData(This, pData, dwSize, dwGetDataFlags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineStateBlock9_Capture(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineStateBlock9_Apply(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_GetContainer(This, riid, ppContainer);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_GetDesc(This, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_LockRect(This, pLockedRect, pRect, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_UnlockRect(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_GetDC(This, phdc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSurface9_ReleaseDC(This, hdc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_Present(This, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, dwFlags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_GetFrontBufferData(This, pDestSurface);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_GetBackBuffer(This, iBackBuffer, Type, ppBackBuffer);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_GetRasterStatus(This, pRasterStatus);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_GetDisplayMode(This, pMode);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9_GetPresentParameters(This, pPresentationParameters);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9Ex_GetLastPresentCount(This, pLastPresentCount);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9Ex_GetPresentStats(This, pPresentationStatistics);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineSwapChain9Ex_GetDisplayModeEx(This, pMode, pRotation);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineTexture9_GetLevelDesc(This, Level, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineTexture9_GetSurfaceLevel(This, Level, ppSurfaceLevel);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineTexture9_LockRect(This, Level, pLockedRect, pRect, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineTexture9_UnlockRect(This, Level);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineTexture9_AddDirtyRect(This, pDirtyRect);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVertexBuffer9_Lock(This, OffsetToLock, SizeToLock, ppbData, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVertexBuffer9_Unlock(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVertexBuffer9_GetDesc(This, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVertexDeclaration9_GetDeclaration(This, pElement, pNumElements);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVertexShader9_GetFunction(This, pData, pSizeOfData);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineUnknown_GetDevice(NineUnknown(This), ppDevice);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolume9_GetContainer(This, riid, ppContainer);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolume9_GetDesc(This, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolume9_LockBox(This, pLockedVolume, pBox, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolume9_UnlockBox(This);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolumeTexture9_GetLevelDesc(This, Level, pDesc);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolumeTexture9_GetVolumeLevel(This, Level, ppVolumeLevel);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
#endif
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolumeTexture9_LockBox(This, Level, pLockedVolume, pBox, Flags);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolumeTexture9_UnlockBox(This, Level);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
HRESULT r;
mtx_lock(&d3dlock_global);
r = NineVolumeTexture9_AddDirtyBox(This, pDirtyBox);
- pipe_mutex_unlock(d3dlock_global);
+ mtx_unlock(&d3dlock_global);
return r;
}
cnd_wait(&ctx->event_push, &ctx->mutex_push);
}
DBG("got cmdbuf=%p\n", cmdbuf);
- pipe_mutex_unlock(ctx->mutex_push);
+ mtx_unlock(&ctx->mutex_push);
cmdbuf->offset = 0;
ctx->cur_instr = 0;
DBG("freeing cmdbuf=%p\n", cmdbuf);
cmdbuf->full = 0;
cnd_signal(&ctx->event_pop);
- pipe_mutex_unlock(ctx->mutex_pop);
+ mtx_unlock(&ctx->mutex_pop);
ctx->tail = (ctx->tail + 1) & NINE_CMD_BUFS_MASK;
mtx_lock(&ctx->mutex_push);
cmdbuf->full = 1;
cnd_signal(&ctx->event_push);
- pipe_mutex_unlock(ctx->mutex_push);
+ mtx_unlock(&ctx->mutex_push);
ctx->head = (ctx->head + 1) & NINE_CMD_BUFS_MASK;
cnd_wait(&ctx->event_pop, &ctx->mutex_pop);
}
DBG("got empty cmdbuf=%p\n", cmdbuf);
- pipe_mutex_unlock(ctx->mutex_pop);
+ mtx_unlock(&ctx->mutex_pop);
cmdbuf->offset = 0;
cmdbuf->num_instr = 0;
}
while (!p_atomic_read(&ctx->processed)) {
cnd_wait(&ctx->event_processed, &ctx->mutex_processed);
}
- pipe_mutex_unlock(ctx->mutex_processed);
+ mtx_unlock(&ctx->mutex_processed);
}
/* CSMT worker thread */
mtx_lock(&ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
cnd_signal(&ctx->event_processed);
- pipe_mutex_unlock(ctx->mutex_processed);
+ mtx_unlock(&ctx->mutex_processed);
}
if (p_atomic_read(&ctx->toPause)) {
- pipe_mutex_unlock(ctx->thread_running);
+ mtx_unlock(&ctx->thread_running);
/* will wait here the thread can be resumed */
mtx_lock(&ctx->thread_resume);
mtx_lock(&ctx->thread_running);
- pipe_mutex_unlock(ctx->thread_resume);
+ mtx_unlock(&ctx->thread_resume);
}
}
- pipe_mutex_unlock(ctx->thread_running);
+ mtx_unlock(&ctx->thread_running);
if (p_atomic_read(&ctx->terminate)) {
mtx_lock(&ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
cnd_signal(&ctx->event_processed);
- pipe_mutex_unlock(ctx->mutex_processed);
+ mtx_unlock(&ctx->mutex_processed);
break;
}
}
return;
ctx->hasPaused = FALSE;
- pipe_mutex_unlock(ctx->thread_running);
- pipe_mutex_unlock(ctx->thread_resume);
+ mtx_unlock(&ctx->thread_running);
+ mtx_unlock(&ctx->thread_resume);
}
struct pipe_context *
++omx_usecount;
- pipe_mutex_unlock(omx_lock);
+ mtx_unlock(&omx_lock);
return omx_screen;
error:
- pipe_mutex_unlock(omx_lock);
+ mtx_unlock(&omx_lock);
return NULL;
}
else
XCloseDisplay(omx_display);
}
- pipe_mutex_unlock(omx_lock);
+ mtx_unlock(&omx_lock);
}
OMX_ERRORTYPE omx_workaround_Destructor(OMX_COMPONENTTYPE *comp)
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
*buf_id = handle_table_add(drv->htab, buf);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf || buf->export_refcount > 0) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
*pbuff = pipe_buffer_map(drv->pipe, buf->derived_surface.resource,
PIPE_TRANSFER_WRITE,
&buf->derived_surface.transfer);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf->derived_surface.transfer || !*pbuff)
return VA_STATUS_ERROR_INVALID_BUFFER;
*pbuff = buf->data;
}
} else {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
*pbuff = buf->data;
}
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf || buf->export_refcount > 0) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
if (buf->derived_surface.resource) {
if (!buf->derived_surface.transfer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
pipe_buffer_unmap(drv->pipe, buf->derived_surface.transfer);
buf->derived_surface.transfer = NULL;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
if (!buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
FREE(buf->data);
FREE(buf);
handle_table_remove(VL_VA_DRIVER(ctx)->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
screen = VL_VA_PSCREEN(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
if (!screen->resource_get_handle(screen, drv->pipe,
buf->derived_surface.resource,
&whandle, PIPE_HANDLE_USAGE_READ_WRITE)) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
buf_info->handle = (intptr_t)whandle.handle;
break;
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
buf = handle_table_get(drv->htab, buf_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
mtx_lock(&drv->mutex);
*config_id = handle_table_add(drv->htab, config);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
*config_id = handle_table_add(drv->htab, config);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
FREE(config);
handle_table_remove(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!config)
return VA_STATUS_ERROR_INVALID_CONFIG;
drv = VL_VA_DRIVER(ctx);
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
is_vpp = config->profile == PIPE_VIDEO_PROFILE_UNKNOWN && !picture_width &&
!picture_height && !flag && !render_targets && !num_render_targets;
mtx_lock(&drv->mutex);
*context_id = handle_table_add(drv->htab, context);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
}
FREE(context);
handle_table_remove(drv->htab, context_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
return VA_STATUS_ERROR_ALLOCATION_FAILED;
mtx_lock(&drv->mutex);
img->image_id = handle_table_add(drv->htab, img);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
img->format = *format;
img->width = width;
pipe_resource_reference(&img_buf->derived_surface.resource, surfaces[0]->texture);
img->buf = handle_table_add(VL_VA_DRIVER(ctx)->htab, img_buf);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
*image = *img;
mtx_lock(&drv->mutex);
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
handle_table_remove(VL_VA_DRIVER(ctx)->htab, image);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
status = vlVaDestroyBuffer(ctx, vaimage->buf);
FREE(vaimage);
return status;
mtx_lock(&drv->mutex);
surf = handle_table_get(drv->htab, surface);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
img_buf = handle_table_get(drv->htab, vaimage->buf);
if (!img_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
format = VaFourccToPipeFormat(vaimage->format.fourcc);
if (format == PIPE_FORMAT_NONE) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
surf->buffer->buffer_format == PIPE_FORMAT_NV12))
convert = true;
else {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
}
views = surf->buffer->get_sampler_view_planes(surf->buffer);
if (!views) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
map = drv->pipe->transfer_map(drv->pipe, views[i]->texture, 0,
PIPE_TRANSFER_READ, &box, &transfer);
if (!map) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
pipe_transfer_unmap(drv->pipe, transfer);
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
surf = handle_table_get(drv->htab, surface);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
vaimage = handle_table_get(drv->htab, image);
if (!vaimage) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
img_buf = handle_table_get(drv->htab, vaimage->buf);
if (!img_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
if (img_buf->derived_surface.resource) {
/* Attempting to transfer derived image to surface */
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_UNIMPLEMENTED;
}
format = VaFourccToPipeFormat(vaimage->format.fourcc);
if (format == PIPE_FORMAT_NONE) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
tmp_buf = drv->pipe->create_video_buffer(drv->pipe, &templat);
if (!tmp_buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
views = surf->buffer->get_sampler_view_planes(surf->buffer);
if (!views) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
}
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
surf = handle_table_get(drv->htab, render_target);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!surf || !surf->buffer)
return VA_STATUS_ERROR_INVALID_SURFACE;
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
for (i = 0; i < num_buffers; ++i) {
vlVaBuffer *buf = handle_table_get(drv->htab, buffers[i]);
if (!buf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_BUFFER;
}
break;
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return vaStatus;
}
mtx_lock(&drv->mutex);
context = handle_table_get(drv->htab, context_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!context)
return VA_STATUS_ERROR_INVALID_CONTEXT;
surf->force_flushed = true;
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
img = handle_table_get(drv->htab, image);
if (!img) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
sub = CALLOC(1, sizeof(*sub));
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
sub->image = img;
*subpicture = handle_table_add(VL_VA_DRIVER(ctx)->htab, sub);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
FREE(sub);
handle_table_remove(drv->htab, subpicture);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
img = handle_table_get(drv->htab, image);
if (!img) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_IMAGE;
}
sub = handle_table_get(drv->htab, subpicture);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!sub)
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
for (i = 0; i < num_surfaces; i++) {
surf = handle_table_get(drv->htab, target_surfaces[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
}
if (!drv->pipe->screen->is_format_supported(
drv->pipe->screen, tex_temp.format, tex_temp.target,
tex_temp.nr_samples, tex_temp.bind)) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
sub->sampler = drv->pipe->create_sampler_view(drv->pipe, tex, &sampler_templ);
pipe_resource_reference(&tex, NULL);
if (!sub->sampler) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
surf = handle_table_get(drv->htab, target_surfaces[i]);
util_dynarray_append(&surf->subpics, vlVaSubpicture *, sub);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
sub = handle_table_get(drv->htab, subpicture);
if (!sub) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SUBPICTURE;
}
for (i = 0; i < num_surfaces; i++) {
surf = handle_table_get(drv->htab, target_surfaces[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
while (surf->subpics.size && util_dynarray_top(&surf->subpics, vlVaSubpicture *) == NULL)
(void)util_dynarray_pop(&surf->subpics, vlVaSubpicture *);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
for (i = 0; i < num_surfaces; ++i) {
vlVaSurface *surf = handle_table_get(drv->htab, surface_list[i]);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
if (surf->buffer)
FREE(surf);
handle_table_remove(drv->htab, surface_list[i]);
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
surf = handle_table_get(drv->htab, render_target);
if (!surf || !surf->buffer) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
if (!surf->feedback) {
// No outstanding operation: nothing to do.
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
context = handle_table_get(drv->htab, surf->ctx);
if (!context) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_CONTEXT;
}
context->decoder->get_feedback(context->decoder, surf->feedback, &(surf->coded_buf->coded_size));
surf->feedback = NULL;
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
surf = handle_table_get(drv->htab, surface_id);
if (!surf) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_SURFACE;
}
tex = vscreen->texture_from_drawable(vscreen, draw);
if (!tex) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
surf_draw = drv->pipe->create_surface(drv->pipe, tex, &surf_templ);
if (!surf_draw) {
pipe_resource_reference(&tex, NULL);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_ERROR_INVALID_DISPLAY;
}
status = vlVaPutSubpictures(surf, drv, surf_draw, dirty_area, &src_rect, &dst_rect);
if (status) {
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return status;
}
pipe_resource_reference(&tex, NULL);
pipe_surface_reference(&surf_draw, NULL);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
}
mtx_lock(&drv->mutex);
config = handle_table_get(drv->htab, config_id);
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (!config)
return VA_STATUS_ERROR_INVALID_CONFIG;
assert(0);
}
}
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
return VA_STATUS_SUCCESS;
no_res:
- pipe_mutex_unlock(drv->mutex);
+ mtx_unlock(&drv->mutex);
if (i)
vlVaDestroySurfaces(ctx, surfaces, i);
goto err_unlock;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
*surface = vlAddDataHTAB(vlsurface);
if (*surface == 0) {
err_sampler:
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
err_unlock:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
DeviceReference(&vlsurface->device, NULL);
FREE(vlsurface);
return ret;
mtx_lock(&vlsurface->device->mutex);
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
vlRemoveDataHTAB(surface);
DeviceReference(&vlsurface->device, NULL);
PIPE_TRANSFER_WRITE, &dst_box, *source_data,
*source_pitches, 0);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
}
PIPE_VIDEO_CAP_SUPPORTED
);
if (!supported) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_INVALID_DECODER_PROFILE;
}
PIPE_VIDEO_CAP_MAX_HEIGHT
);
if (width > maxwidth || height > maxheight) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_INVALID_SIZE;
}
vldecoder = CALLOC(1,sizeof(vlVdpDecoder));
if (!vldecoder) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_RESOURCES;
}
}
(void) mtx_init(&vldecoder->mutex, mtx_plain);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
vldecoder->decoder->destroy(vldecoder->decoder);
error_decoder:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
DeviceReference(&vldecoder->device, NULL);
FREE(vldecoder);
return ret;
mtx_lock(&vldecoder->mutex);
vldecoder->decoder->destroy(vldecoder->decoder);
- pipe_mutex_unlock(vldecoder->mutex);
+ mtx_unlock(&vldecoder->mutex);
mtx_destroy(&vldecoder->mutex);
vlRemoveDataHTAB(decoder);
/* still no luck? get me out of here... */
if (!vlsurf->video_buffer) {
- pipe_mutex_unlock(vlsurf->device->mutex);
+ mtx_unlock(&vlsurf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
vlVdpVideoSurfaceClear(vlsurf);
- pipe_mutex_unlock(vlsurf->device->mutex);
+ mtx_unlock(&vlsurf->device->mutex);
}
for (i = 0; i < bitstream_buffer_count; ++i) {
dec->begin_frame(dec, vlsurf->video_buffer, &desc.base);
dec->decode_bitstream(dec, vlsurf->video_buffer, &desc.base, bitstream_buffer_count, buffers, sizes);
dec->end_frame(dec, vlsurf->video_buffer, &desc.base);
- pipe_mutex_unlock(vldecoder->mutex);
+ mtx_unlock(&vldecoder->mutex);
return ret;
}
if (!htab)
htab = handle_table_create();
ret = htab != NULL;
- pipe_mutex_unlock(htab_lock);
+ mtx_unlock(&htab_lock);
return ret;
}
handle_table_destroy(htab);
htab = NULL;
}
- pipe_mutex_unlock(htab_lock);
+ mtx_unlock(&htab_lock);
}
vlHandle vlAddDataHTAB(void *data)
mtx_lock(&htab_lock);
if (htab)
handle = handle_table_add(htab, data);
- pipe_mutex_unlock(htab_lock);
+ mtx_unlock(&htab_lock);
return handle;
}
mtx_lock(&htab_lock);
if (htab)
data = handle_table_get(htab, handle);
- pipe_mutex_unlock(htab_lock);
+ mtx_unlock(&htab_lock);
return data;
}
mtx_lock(&htab_lock);
if (htab)
handle_table_remove(htab, handle);
- pipe_mutex_unlock(htab_lock);
+ mtx_unlock(&htab_lock);
}
}
vmixer->luma_key.luma_min = 1.0f;
vmixer->luma_key.luma_max = 0.0f;
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
err_csc_matrix:
vl_compositor_cleanup_state(&vmixer->cstate);
no_compositor_state:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
DeviceReference(&vmixer->device, NULL);
FREE(vmixer);
return ret;
vl_bicubic_filter_cleanup(vmixer->bicubic.filter);
FREE(vmixer->bicubic.filter);
}
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
DeviceReference(&vmixer->device, NULL);
FREE(vmixer);
break;
default:
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE;
}
for (i = 0; i < layer_count; ++i) {
vlVdpOutputSurface *src = vlGetDataHTAB(layers->source_surface);
if (!src) {
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_INVALID_HANDLE;
}
pipe_sampler_view_reference(&sampler_view, NULL);
pipe_surface_reference(&surface, NULL);
}
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_OK;
}
if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE))
if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc,
vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) {
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_ERROR;
}
break;
break;
default:
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_INVALID_VIDEO_MIXER_FEATURE;
}
}
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_OK;
}
goto fail;
}
}
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_OK;
fail:
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return ret;
}
*(uint8_t*)attribute_values[i] = vmixer->skip_chroma_deint;
break;
default:
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_INVALID_VIDEO_MIXER_ATTRIBUTE;
}
}
- pipe_mutex_unlock(vmixer->device->mutex);
+ mtx_unlock(&vmixer->device->mutex);
return VDP_STATUS_OK;
}
goto err_resource;
vl_compositor_reset_dirty_area(&vlsurface->dirty_area);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
pipe_surface_reference(&vlsurface->surface, NULL);
pipe_resource_reference(&res, NULL);
err_unlock:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
DeviceReference(&vlsurface->device, NULL);
FREE(vlsurface);
return VDP_STATUS_ERROR;
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
pipe->screen->fence_reference(pipe->screen, &vlsurface->fence, NULL);
vl_compositor_cleanup_state(&vlsurface->cstate);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
vlRemoveDataHTAB(surface);
DeviceReference(&vlsurface->device, NULL);
box = RectToPipeBox(source_rect, res);
map = pipe->transfer_map(pipe, res, 0, PIPE_TRANSFER_READ, &box, &transfer);
if (!map) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
box.width, box.height, map, transfer->stride, 0, 0);
pipe_transfer_unmap(pipe, transfer);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
}
/* Check for a no-op. (application bug?) */
if (!dst_box.width || !dst_box.height) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
}
pipe->texture_subdata(pipe, vlsurface->sampler_view->texture, 0,
PIPE_TRANSFER_WRITE, &dst_box, *source_data,
*source_pitches, 0);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
}
pipe_sampler_view_reference(&sv_idx, NULL);
pipe_sampler_view_reference(&sv_tbl, NULL);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
error_resource:
pipe_sampler_view_reference(&sv_idx, NULL);
pipe_sampler_view_reference(&sv_tbl, NULL);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
vbuffer = pipe->create_video_buffer(pipe, &vtmpl);
if (!vbuffer) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
sampler_views = vbuffer->get_sampler_view_planes(vbuffer);
if (!sampler_views) {
vbuffer->destroy(vbuffer);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
vl_compositor_render(cstate, compositor, vlsurface->surface, &vlsurface->dirty_area, false);
vbuffer->destroy(vbuffer);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
err_csc_matrix:
vbuffer->destroy(vbuffer);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_ERROR;
}
vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false);
context->delete_blend_state(context, blend);
- pipe_mutex_unlock(dst_vlsurface->device->mutex);
+ mtx_unlock(&dst_vlsurface->device->mutex);
return VDP_STATUS_OK;
}
vl_compositor_render(cstate, compositor, dst_vlsurface->surface, &dst_vlsurface->dirty_area, false);
context->delete_blend_state(context, blend);
- pipe_mutex_unlock(dst_vlsurface->device->mutex);
+ mtx_unlock(&dst_vlsurface->device->mutex);
return VDP_STATUS_OK;
}
mtx_lock(&vlsurface->device->mutex);
vlsurface->device->context->flush(vlsurface->device->context, NULL, 0);
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return vlsurface->surface->texture;
}
if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context,
vlsurface->surface->texture, &whandle,
PIPE_HANDLE_USAGE_READ_WRITE)) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
result->handle = whandle.handle;
result->width = vlsurface->surface->width;
mtx_lock(&dev->mutex);
if (!vl_compositor_init_state(&pq->cstate, dev->context)) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
ret = VDP_STATUS_ERROR;
goto no_compositor;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
*presentation_queue = vlAddDataHTAB(pq);
if (*presentation_queue == 0) {
mtx_lock(&pq->device->mutex);
vl_compositor_cleanup_state(&pq->cstate);
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
vlRemoveDataHTAB(presentation_queue);
DeviceReference(&pq->device, NULL);
mtx_lock(&pq->device->mutex);
vl_compositor_set_clear_color(&pq->cstate, &color);
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
return VDP_STATUS_OK;
}
mtx_lock(&pq->device->mutex);
vl_compositor_get_clear_color(&pq->cstate, &color);
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
background_color->red = color.f[0];
background_color->green = color.f[1];
mtx_lock(&pq->device->mutex);
*current_time = pq->device->vscreen->get_timestamp(pq->device->vscreen,
(void *)pq->drawable);
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
return VDP_STATUS_OK;
}
vscreen->set_back_texture_from_output(vscreen, surf->surface->texture, clip_width, clip_height);
tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable);
if (!tex) {
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
return VDP_STATUS_INVALID_HANDLE;
}
pipe_resource_reference(&tex, NULL);
pipe_surface_reference(&surf_draw, NULL);
}
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
return VDP_STATUS_OK;
}
screen->fence_finish(screen, NULL, surf->fence, PIPE_TIMEOUT_INFINITE);
screen->fence_reference(screen, &surf->fence, NULL);
}
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
return vlVdpPresentationQueueGetTime(presentation_queue, first_presentation_time);
}
if (screen->fence_finish(screen, NULL, surf->fence, 0)) {
screen->fence_reference(screen, &surf->fence, NULL);
*status = VDP_PRESENTATION_QUEUE_STATUS_VISIBLE;
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
// We actually need to query the timestamp of the last VSYNC event from the hardware
vlVdpPresentationQueueGetTime(presentation_queue, first_presentation_time);
*first_presentation_time += 1;
} else {
*status = VDP_PRESENTATION_QUEUE_STATUS_QUEUED;
- pipe_mutex_unlock(pq->device->mutex);
+ mtx_unlock(&pq->device->mutex);
}
}
/* XXX: Current limits */
*is_supported = true;
max_2d_texture_level = pscreen->get_param(pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
if (!max_2d_texture_level)
return VDP_STATUS_RESOURCES;
PIPE_FORMAT_NV12,
PIPE_VIDEO_PROFILE_UNKNOWN,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM)) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
break;
PIPE_VIDEO_PROFILE_UNKNOWN,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM
);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
*max_level = 0;
*max_macroblocks = 0;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
if (!max_2d_texture_level) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_ERROR;
}
*max_width = 0;
*max_height = 0;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
pscreen, format, PIPE_TEXTURE_2D, 1,
PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET
);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
pscreen, colortbl_format, PIPE_TEXTURE_1D, 1,
PIPE_BIND_SAMPLER_VIEW
);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
PIPE_VIDEO_PROFILE_UNKNOWN,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM
);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
if (!max_2d_texture_level) {
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_ERROR;
}
*max_width = 0;
*max_height = 0;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
case VDP_VIDEO_MIXER_PARAMETER_CHROMA_TYPE:
default:
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_INVALID_VIDEO_MIXER_PARAMETER;
}
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
return VDP_STATUS_OK;
}
/* do not mandate early allocation of a video buffer */
vlVdpVideoSurfaceClear(p_surf);
- pipe_mutex_unlock(dev->mutex);
+ mtx_unlock(&dev->mutex);
*surface = vlAddDataHTAB(p_surf);
if (*surface == 0) {
mtx_lock(&p_surf->device->mutex);
if (p_surf->video_buffer)
p_surf->video_buffer->destroy(p_surf->video_buffer);
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
vlRemoveDataHTAB(surface);
DeviceReference(&p_surf->device, NULL);
mtx_lock(&vlsurface->device->mutex);
sampler_views = vlsurface->video_buffer->get_sampler_view_planes(vlsurface->video_buffer);
if (!sampler_views) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
map = pipe->transfer_map(pipe, sv->texture, 0,
PIPE_TRANSFER_READ, &box, &transfer);
if (!map) {
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_RESOURCES;
}
pipe_transfer_unmap(pipe, transfer);
}
}
- pipe_mutex_unlock(vlsurface->device->mutex);
+ mtx_unlock(&vlsurface->device->mutex);
return VDP_STATUS_OK;
}
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERED_FORMAT);
if (nformat == PIPE_FORMAT_NONE) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
}
/* stil no luck? ok forget it we don't support it */
if (!p_surf->video_buffer) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
vlVdpVideoSurfaceClear(p_surf);
sampler_views = p_surf->video_buffer->get_sampler_view_planes(p_surf->video_buffer);
if (!sampler_views) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_RESOURCES;
}
map = pipe->transfer_map(pipe, tex, 0, usage,
&dst_box, &transfer);
if (!map) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_RESOURCES;
}
usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
}
}
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_OK;
}
/* try to create a video buffer if we don't already have one */
p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);
}
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return p_surf->video_buffer;
}
/* Check if surface match interop requirements */
if (p_surf->video_buffer == NULL || !p_surf->video_buffer->interlaced ||
p_surf->video_buffer->buffer_format != PIPE_FORMAT_NV12) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
surf = p_surf->video_buffer->get_surfaces(p_surf->video_buffer)[plane];
if (!surf) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_RESOURCES;
}
if (!pscreen->resource_get_handle(pscreen, p_surf->device->context,
surf->texture, &whandle,
PIPE_HANDLE_USAGE_READ_WRITE)) {
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
return VDP_STATUS_NO_IMPLEMENTATION;
}
- pipe_mutex_unlock(p_surf->device->mutex);
+ mtx_unlock(&p_surf->device->mutex);
result->handle = whandle.handle;
result->width = surf->width;
GalliumContext::Unlock()
{
CALLED();
- pipe_mutex_unlock(fMutex);
+ mtx_unlock(&fMutex);
}
/* vim: set tabstop=4: */
bo->num_fences -= idle_fences;
buffer_idle = !bo->num_fences;
- pipe_mutex_unlock(ws->bo_fence_lock);
+ mtx_unlock(&ws->bo_fence_lock);
return buffer_idle;
} else {
amdgpu_fence_reference(&fence, bo->fences[0]);
/* Wait for the fence. */
- pipe_mutex_unlock(ws->bo_fence_lock);
+ mtx_unlock(&ws->bo_fence_lock);
if (amdgpu_fence_wait(fence, abs_timeout, true))
fence_idle = true;
else
amdgpu_fence_reference(&fence, NULL);
}
- pipe_mutex_unlock(ws->bo_fence_lock);
+ mtx_unlock(&ws->bo_fence_lock);
return buffer_idle;
}
mtx_lock(&bo->ws->global_bo_list_lock);
LIST_DEL(&bo->u.real.global_list_item);
bo->ws->num_buffers--;
- pipe_mutex_unlock(bo->ws->global_bo_list_lock);
+ mtx_unlock(&bo->ws->global_bo_list_lock);
amdgpu_bo_va_op(bo->bo, 0, bo->base.size, bo->va, 0, AMDGPU_VA_OP_UNMAP);
amdgpu_va_range_free(bo->u.real.va_handle);
mtx_lock(&ws->global_bo_list_lock);
LIST_ADDTAIL(&bo->u.real.global_list_item, &ws->global_bo_list);
ws->num_buffers++;
- pipe_mutex_unlock(ws->global_bo_list_lock);
+ mtx_unlock(&ws->global_bo_list_lock);
}
static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws,
handles = malloc(sizeof(handles[0]) * ws->num_buffers);
if (!handles) {
- pipe_mutex_unlock(ws->global_bo_list_lock);
+ mtx_unlock(&ws->global_bo_list_lock);
amdgpu_cs_context_cleanup(cs);
cs->error_code = -ENOMEM;
return;
handles, NULL,
&cs->request.resources);
free(handles);
- pipe_mutex_unlock(ws->global_bo_list_lock);
+ mtx_unlock(&ws->global_bo_list_lock);
} else {
r = amdgpu_bo_list_create(ws->dev, cs->num_real_buffers,
cs->handles, cs->flags,
util_queue_add_job(&ws->cs_queue, cs, &cs->flush_completed,
amdgpu_cs_submit_ib, NULL);
/* The submission has been queued, unlock the fence now. */
- pipe_mutex_unlock(ws->bo_fence_lock);
+ mtx_unlock(&ws->bo_fence_lock);
if (!(flags & RADEON_FLUSH_ASYNC)) {
amdgpu_cs_sync_flush(rcs);
if (destroy && dev_tab)
util_hash_table_remove(dev_tab, ws->dev);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return destroy;
}
* for the same fd. */
r = amdgpu_device_initialize(fd, &drm_major, &drm_minor, &dev);
if (r) {
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
fprintf(stderr, "amdgpu: amdgpu_device_initialize failed.\n");
return NULL;
}
ws = util_hash_table_get(dev_tab, dev);
if (ws) {
pipe_reference(NULL, &ws->reference);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return &ws->base;
}
if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1)) {
amdgpu_winsys_destroy(&ws->base);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}
ws->base.screen = screen_create(&ws->base);
if (!ws->base.screen) {
amdgpu_winsys_destroy(&ws->base);
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}
/* We must unlock the mutex once the winsys is fully initialized, so that
* other threads attempting to create the winsys from the same fd will
* get a fully initialized winsys and not just half-way initialized. */
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return &ws->base;
fail_alloc:
FREE(ws);
fail:
- pipe_mutex_unlock(dev_tab_mutex);
+ mtx_unlock(&dev_tab_mutex);
return NULL;
}
int fd = etna_device_fd(screen->dev);
util_hash_table_remove(etna_tab, intptr_to_pointer(fd));
}
- pipe_mutex_unlock(etna_screen_mutex);
+ mtx_unlock(&etna_screen_mutex);
if (destroy) {
pscreen->destroy = screen->winsys_priv;
}
unlock:
- pipe_mutex_unlock(etna_screen_mutex);
+ mtx_unlock(&etna_screen_mutex);
return pscreen;
}
int fd = fd_device_fd(screen->dev);
util_hash_table_remove(fd_tab, intptr_to_pointer(fd));
}
- pipe_mutex_unlock(fd_screen_mutex);
+ mtx_unlock(&fd_screen_mutex);
if (destroy) {
pscreen->destroy = screen->winsys_priv;
}
unlock:
- pipe_mutex_unlock(fd_screen_mutex);
+ mtx_unlock(&fd_screen_mutex);
return pscreen;
}
assert(ret >= 0);
if (ret == 0)
util_hash_table_remove(fd_tab, intptr_to_pointer(screen->drm->fd));
- pipe_mutex_unlock(nouveau_screen_mutex);
+ mtx_unlock(&nouveau_screen_mutex);
return ret == 0;
}
if (!fd_tab) {
fd_tab = util_hash_table_create(hash_fd, compare_fd);
if (!fd_tab) {
- pipe_mutex_unlock(nouveau_screen_mutex);
+ mtx_unlock(&nouveau_screen_mutex);
return NULL;
}
}
screen = util_hash_table_get(fd_tab, intptr_to_pointer(fd));
if (screen) {
screen->refcount++;
- pipe_mutex_unlock(nouveau_screen_mutex);
+ mtx_unlock(&nouveau_screen_mutex);
return &screen->base;
}
*/
util_hash_table_set(fd_tab, intptr_to_pointer(dupfd), screen);
screen->refcount = 1;
- pipe_mutex_unlock(nouveau_screen_mutex);
+ mtx_unlock(&nouveau_screen_mutex);
return &screen->base;
err:
nouveau_drm_del(&drm);
close(dupfd);
}
- pipe_mutex_unlock(nouveau_screen_mutex);
+ mtx_unlock(&nouveau_screen_mutex);
return NULL;
}
memmove(&bo->u.slab.fences[0], &bo->u.slab.fences[num_idle],
(bo->u.slab.num_fences - num_idle) * sizeof(bo->u.slab.fences[0]));
bo->u.slab.num_fences -= num_idle;
- pipe_mutex_unlock(bo->rws->bo_fence_lock);
+ mtx_unlock(&bo->rws->bo_fence_lock);
return busy;
}
while (bo->u.slab.num_fences) {
struct radeon_bo *fence = NULL;
radeon_bo_reference(&fence, bo->u.slab.fences[0]);
- pipe_mutex_unlock(bo->rws->bo_fence_lock);
+ mtx_unlock(&bo->rws->bo_fence_lock);
/* Wait without holding the fence lock. */
radeon_real_bo_wait_idle(fence);
}
radeon_bo_reference(&fence, NULL);
}
- pipe_mutex_unlock(bo->rws->bo_fence_lock);
+ mtx_unlock(&bo->rws->bo_fence_lock);
}
}
offset = hole->offset;
list_del(&hole->list);
FREE(hole);
- pipe_mutex_unlock(rws->bo_va_mutex);
+ mtx_unlock(&rws->bo_va_mutex);
return offset;
}
if ((hole->size - waste) > size) {
}
hole->size -= (size + waste);
hole->offset += size + waste;
- pipe_mutex_unlock(rws->bo_va_mutex);
+ mtx_unlock(&rws->bo_va_mutex);
return offset;
}
if ((hole->size - waste) == size) {
hole->size = waste;
- pipe_mutex_unlock(rws->bo_va_mutex);
+ mtx_unlock(&rws->bo_va_mutex);
return offset;
}
}
}
offset += waste;
rws->va_offset += size + waste;
- pipe_mutex_unlock(rws->bo_va_mutex);
+ mtx_unlock(&rws->bo_va_mutex);
return offset;
}
}
}
out:
- pipe_mutex_unlock(rws->bo_va_mutex);
+ mtx_unlock(&rws->bo_va_mutex);
}
void radeon_bo_destroy(struct pb_buffer *_buf)
util_hash_table_remove(rws->bo_names,
(void*)(uintptr_t)bo->flink_name);
}
- pipe_mutex_unlock(rws->bo_handles_mutex);
+ mtx_unlock(&rws->bo_handles_mutex);
if (bo->u.real.ptr)
os_munmap(bo->u.real.ptr, bo->base.size);
/* Return the pointer if it's already mapped. */
if (bo->u.real.ptr) {
bo->u.real.map_count++;
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
return (uint8_t*)bo->u.real.ptr + offset;
}
args.handle = bo->handle;
DRM_RADEON_GEM_MMAP,
&args,
sizeof(args))) {
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
fprintf(stderr, "radeon: gem_mmap failed: %p 0x%08X\n",
bo, bo->handle);
return NULL;
ptr = os_mmap(0, args.size, PROT_READ|PROT_WRITE, MAP_SHARED,
bo->rws->fd, args.addr_ptr);
if (ptr == MAP_FAILED) {
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
fprintf(stderr, "radeon: mmap failed, errno: %i\n", errno);
return NULL;
}
bo->rws->mapped_gtt += bo->base.size;
bo->rws->num_mapped_buffers++;
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
return (uint8_t*)bo->u.real.ptr + offset;
}
mtx_lock(&bo->u.real.map_mutex);
if (!bo->u.real.ptr) {
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
return; /* it's not been mapped */
}
assert(bo->u.real.map_count);
if (--bo->u.real.map_count) {
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
return; /* it's been mapped multiple times */
}
bo->rws->mapped_gtt -= bo->base.size;
bo->rws->num_mapped_buffers--;
- pipe_mutex_unlock(bo->u.real.map_mutex);
+ mtx_unlock(&bo->u.real.map_mutex);
}
static const struct pb_vtbl radeon_bo_vtbl = {
struct radeon_bo *old_bo =
util_hash_table_get(rws->bo_vas, (void*)(uintptr_t)va.offset);
- pipe_mutex_unlock(rws->bo_handles_mutex);
+ mtx_unlock(&rws->bo_handles_mutex);
pb_reference(&b, &old_bo->base);
return radeon_bo(b);
}
util_hash_table_set(rws->bo_vas, (void*)(uintptr_t)bo->va, bo);
- pipe_mutex_unlock(rws->bo_handles_mutex);
+ mtx_unlock(&rws->bo_handles_mutex);
}
if (initial_domains & RADEON_DOMAIN_VRAM)
mtx_lock(&ws->bo_handles_mutex);
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
return &bo->base;
}
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
if (ws->info.has_virtual_memory) {
struct drm_radeon_gem_va va;
struct radeon_bo *old_bo =
util_hash_table_get(ws->bo_vas, (void*)(uintptr_t)va.offset);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
pb_reference(&b, &old_bo->base);
return b;
}
util_hash_table_set(ws->bo_vas, (void*)(uintptr_t)bo->va, bo);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
}
ws->allocated_gtt += align(bo->base.size, ws->info.gart_page_size);
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
done:
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
if (stride)
*stride = whandle->stride;
struct radeon_bo *old_bo =
util_hash_table_get(ws->bo_vas, (void*)(uintptr_t)va.offset);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
pb_reference(&b, &old_bo->base);
return b;
}
util_hash_table_set(ws->bo_vas, (void*)(uintptr_t)bo->va, bo);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
}
bo->initial_domain = radeon_bo_get_initial_domain((void*)bo);
return (struct pb_buffer*)bo;
fail:
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
return NULL;
}
mtx_lock(&ws->bo_handles_mutex);
util_hash_table_set(ws->bo_names, (void*)(uintptr_t)bo->flink_name, bo);
- pipe_mutex_unlock(ws->bo_handles_mutex);
+ mtx_unlock(&ws->bo_handles_mutex);
}
whandle->handle = bo->flink_name;
} else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
p_atomic_inc(&bo->num_active_ioctls);
radeon_bo_slab_fence(bo, (struct radeon_bo *)fence);
}
- pipe_mutex_unlock(cs->ws->bo_fence_lock);
+ mtx_unlock(&cs->ws->bo_fence_lock);
radeon_fence_reference(&fence, NULL);
} else {
/* Early exit if we are sure the request will fail. */
if (enable) {
if (*owner) {
- pipe_mutex_unlock(*mutex);
+ mtx_unlock(&*mutex);
return false;
}
} else {
if (*owner != applier) {
- pipe_mutex_unlock(*mutex);
+ mtx_unlock(&*mutex);
return false;
}
}
info.request = request;
if (drmCommandWriteRead(applier->ws->fd, DRM_RADEON_INFO,
&info, sizeof(info)) != 0) {
- pipe_mutex_unlock(*mutex);
+ mtx_unlock(&*mutex);
return false;
}
if (enable) {
if (value) {
*owner = applier;
- pipe_mutex_unlock(*mutex);
+ mtx_unlock(&*mutex);
return true;
}
} else {
*owner = NULL;
}
- pipe_mutex_unlock(*mutex);
+ mtx_unlock(&*mutex);
return false;
}
if (destroy && fd_tab)
util_hash_table_remove(fd_tab, intptr_to_pointer(rws->fd));
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
return destroy;
}
ws = util_hash_table_get(fd_tab, intptr_to_pointer(fd));
if (ws) {
pipe_reference(NULL, &ws->reference);
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
return &ws->base;
}
ws = CALLOC_STRUCT(radeon_drm_winsys);
if (!ws) {
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
return NULL;
}
ws->base.screen = screen_create(&ws->base);
if (!ws->base.screen) {
radeon_winsys_destroy(&ws->base);
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
return NULL;
}
/* We must unlock the mutex once the winsys is fully initialized, so that
* other threads attempting to create the winsys from the same fd will
* get a fully initialized winsys and not just half-way initialized. */
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
return &ws->base;
fail_cache:
pb_cache_deinit(&ws->bo_cache);
fail1:
- pipe_mutex_unlock(fd_tab_mutex);
+ mtx_unlock(&fd_tab_mutex);
if (ws->surf_man)
radeon_surface_manager_free(ws->surf_man);
if (ws->fd >= 0)
ops->fence_reference(ops, &fence, fenced_buf->fence);
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
finished = ops->fence_finish(ops, fenced_buf->fence, 0);
fenced_buffer_destroy_locked(fenced_mgr, fenced_buf);
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
}
done:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return map;
}
fenced_buf->flags &= ~PB_USAGE_CPU_READ_WRITE;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
fenced_buf->validation_flags |= flags;
done:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return ret;
}
fenced_buf->validation_flags = 0;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
*offset = 0;
}
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
}
LIST_ADDTAIL(&fenced_buf->head, &fenced_mgr->unfenced);
++fenced_mgr->num_unfenced;
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
return &fenced_buf->base;
no_storage:
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
FREE(fenced_buf);
no_buffer:
return NULL;
mtx_lock(&fenced_mgr->mutex);
while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE))
;
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
assert(fenced_mgr->provider->flush);
if(fenced_mgr->provider->flush)
/* Wait on outstanding fences */
while (fenced_mgr->num_fenced) {
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
sched_yield();
#endif
/*assert(!fenced_mgr->num_unfenced);*/
#endif
- pipe_mutex_unlock(fenced_mgr->mutex);
+ mtx_unlock(&fenced_mgr->mutex);
mtx_destroy(&fenced_mgr->mutex);
FREE(fenced_mgr);
vmw_swc_mob_relocation(swc, mobid, NULL, (struct svga_winsys_buffer *)
vsurf->buf, 0, flags);
- pipe_mutex_unlock(vsurf->mutex);
+ mtx_unlock(&vsurf->mutex);
}
}
mtx_lock(&ops->mutex);
LIST_FOR_EACH_ENTRY_SAFE(fence, n, &ops->not_signaled, ops_list)
LIST_DELINIT(&fence->ops_list);
- pipe_mutex_unlock(ops->mutex);
+ mtx_unlock(&ops->mutex);
}
/**
ops->last_emitted = emitted;
out_unlock:
- pipe_mutex_unlock(ops->mutex);
+ mtx_unlock(&ops->mutex);
}
LIST_ADDTAIL(&fence->ops_list, &ops->not_signaled);
}
- pipe_mutex_unlock(ops->mutex);
+ mtx_unlock(&ops->mutex);
return (struct pipe_fence_handle *) fence;
}
mtx_lock(&ops->mutex);
LIST_DELINIT(&vfence->ops_list);
- pipe_mutex_unlock(ops->mutex);
+ mtx_unlock(&ops->mutex);
FREE(vfence);
}
vsrf->data = data;
vsrf->map_mode = flags & (PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE);
out_unlock:
- pipe_mutex_unlock(vsrf->mutex);
+ mtx_unlock(&vsrf->mutex);
return data;
}
} else {
*rebind = FALSE;
}
- pipe_mutex_unlock(vsrf->mutex);
+ mtx_unlock(&vsrf->mutex);
}
void
mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_remove(qdws->bo_names,
(void *)(uintptr_t)res->flink);
- pipe_mutex_unlock(qdws->bo_handles_mutex);
+ mtx_unlock(&qdws->bo_handles_mutex);
}
if (res->bo_handle) {
mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_remove(qdws->bo_handles,
(void *)(uintptr_t)res->bo_handle);
- pipe_mutex_unlock(qdws->bo_handles_mutex);
+ mtx_unlock(&qdws->bo_handles_mutex);
}
if (res->ptr)
curr = next;
next = curr->next;
}
- pipe_mutex_unlock(qdws->mutex);
+ mtx_unlock(&qdws->mutex);
}
static void
virgl_drm_winsys_destroy(struct virgl_winsys *qws)
old->end = old->start + qdws->usecs;
LIST_ADDTAIL(&old->head, &qdws->delayed);
qdws->num_delayed++;
- pipe_mutex_unlock(qdws->mutex);
+ mtx_unlock(&qdws->mutex);
}
}
*dres = sres;
if (res) {
LIST_DEL(&res->head);
--qdws->num_delayed;
- pipe_mutex_unlock(qdws->mutex);
+ mtx_unlock(&qdws->mutex);
pipe_reference_init(&res->reference, 1);
return res;
}
- pipe_mutex_unlock(qdws->mutex);
+ mtx_unlock(&qdws->mutex);
alloc:
res = virgl_drm_winsys_resource_create(qws, target, format, bind,
util_hash_table_set(qdws->bo_handles, (void *)(uintptr_t)handle, res);
done:
- pipe_mutex_unlock(qdws->bo_handles_mutex);
+ mtx_unlock(&qdws->bo_handles_mutex);
return res;
}
mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_set(qdws->bo_names, (void *)(uintptr_t)res->flink, res);
- pipe_mutex_unlock(qdws->bo_handles_mutex);
+ mtx_unlock(&qdws->bo_handles_mutex);
}
whandle->handle = res->flink;
} else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
return FALSE;
mtx_lock(&qdws->bo_handles_mutex);
util_hash_table_set(qdws->bo_handles, (void *)(uintptr_t)res->bo_handle, res);
- pipe_mutex_unlock(qdws->bo_handles_mutex);
+ mtx_unlock(&qdws->bo_handles_mutex);
}
whandle->stride = stride;
return TRUE;
int fd = virgl_drm_winsys(screen->vws)->fd;
util_hash_table_remove(fd_tab, intptr_to_pointer(fd));
}
- pipe_mutex_unlock(virgl_screen_mutex);
+ mtx_unlock(&virgl_screen_mutex);
if (destroy) {
pscreen->destroy = screen->winsys_priv;
}
unlock:
- pipe_mutex_unlock(virgl_screen_mutex);
+ mtx_unlock(&virgl_screen_mutex);
return pscreen;
}
curr = next;
next = curr->next;
}
- pipe_mutex_unlock(vtws->mutex);
+ mtx_unlock(&vtws->mutex);
}
static void
old->end = old->start + vtws->usecs;
LIST_ADDTAIL(&old->head, &vtws->delayed);
vtws->num_delayed++;
- pipe_mutex_unlock(vtws->mutex);
+ mtx_unlock(&vtws->mutex);
}
}
*dres = sres;
if (res) {
LIST_DEL(&res->head);
--vtws->num_delayed;
- pipe_mutex_unlock(vtws->mutex);
+ mtx_unlock(&vtws->mutex);
pipe_reference_init(&res->reference, 1);
return res;
}
- pipe_mutex_unlock(vtws->mutex);
+ mtx_unlock(&vtws->mutex);
alloc:
res = virgl_vtest_winsys_resource_create(vws, target, format, bind,