Lines Matching refs:fences

61 	pipe_mutex_lock(rscreen->fences.mutex);
63 if (!rscreen->fences.bo) {
65 rscreen->fences.bo = si_resource_create_custom(&rscreen->screen,
68 if (!rscreen->fences.bo) {
72 rscreen->fences.data = rctx->ws->buffer_map(rscreen->fences.bo->cs_buf,
77 if (!LIST_IS_EMPTY(&rscreen->fences.pool)) {
81 LIST_FOR_EACH_ENTRY(entry, &rscreen->fences.pool, head) {
82 if (rscreen->fences.data[entry->index] != 0) {
95 if ((rscreen->fences.next_index + 1) >= 1024) {
96 R600_ERR("r600: too many concurrent fences\n");
100 index = rscreen->fences.next_index++;
108 LIST_ADD(&block->head, &rscreen->fences.blocks);
110 block = LIST_ENTRY(struct r600_fence_block, rscreen->fences.blocks.next, head);
113 fence = &block->fences[index % FENCE_BLOCK_SIZE];
119 rscreen->fences.data[fence->index] = 0;
120 si_context_emit_fence(rctx, rscreen->fences.bo, fence->index, 1);
129 pipe_mutex_unlock(rscreen->fences.mutex);
501 if (rscreen->fences.bo) {
504 LIST_FOR_EACH_ENTRY_SAFE(entry, tmp, &rscreen->fences.blocks, head) {
509 rscreen->ws->buffer_unmap(rscreen->fences.bo->cs_buf);
510 si_resource_reference(&rscreen->fences.bo, NULL);
512 pipe_mutex_destroy(rscreen->fences.mutex);
527 pipe_mutex_lock(rscreen->fences.mutex);
529 LIST_ADDTAIL(&(*oldf)->head, &rscreen->fences.pool);
530 pipe_mutex_unlock(rscreen->fences.mutex);
542 return rscreen->fences.data[rfence->index];
561 while (rscreen->fences.data[rfence->index] == 0) {
586 return rscreen->fences.data[rfence->index] != 0;
707 rscreen->fences.bo = NULL;
708 rscreen->fences.data = NULL;
709 rscreen->fences.next_index = 0;
710 LIST_INITHEAD(&rscreen->fences.pool);
711 LIST_INITHEAD(&rscreen->fences.blocks);
712 pipe_mutex_init(rscreen->fences.mutex);