Lines Matching refs:fence
45 /* If the context wasn't flushed at fence creation, this is non-NULL. */
64 * \param old_value Previous fence value (for a bug workaround)
188 static void si_add_fence_dependency(struct si_context *sctx, struct pipe_fence_handle *fence)
192 ws->cs_add_fence_dependency(&sctx->gfx_cs, fence, 0);
195 static void si_add_syncobj_signal(struct si_context *sctx, struct pipe_fence_handle *fence)
197 sctx->ws->cs_add_syncobj_signal(&sctx->gfx_cs, fence);
218 struct si_fence *fence = CALLOC_STRUCT(si_fence);
219 if (!fence)
222 pipe_reference_init(&fence->reference, 1);
223 util_queue_fence_init(&fence->ready);
225 return fence;
231 struct si_fence *fence = si_create_multi_fence();
232 if (!fence)
235 util_queue_fence_reset(&fence->ready);
236 tc_unflushed_batch_token_reference(&fence->tc_token, tc_token);
238 return (struct pipe_fence_handle *)fence;
248 uint32_t *fence = (uint32_t *)(map + fine->offset);
249 return *fence != 0;
258 /* Use cached system memory for the fence. */
283 struct pipe_fence_handle *fence, uint64_t timeout)
286 struct si_fence *sfence = (struct si_fence *)fence;
296 * this fence, but only if we're in the API thread
300 * be in flight in the driver thread, so the fence
339 * fence command issued previously, but not yet flushed to
374 * the fine-grained fence have completed. */
410 unreachable("bad fence fd type when importing");
422 static int si_fence_get_fd(struct pipe_screen *screen, struct pipe_fence_handle *fence)
426 struct si_fence *sfence = (struct si_fence *)fence;
455 struct pipe_fence_handle **fence,
475 assert(fence);
485 if (fence)
492 /* Instead of flushing, create a deferred fence. Constraints:
494 * - the gallium frontend must request a fence.
498 if (flags & PIPE_FLUSH_DEFERRED && !(flags & PIPE_FLUSH_FENCE_FD) && fence) {
502 si_flush_gfx_cs(sctx, rflags, fence ? &gfx_fence : NULL);
507 if (fence) {
511 new_fence = (struct si_fence *)*fence;
520 screen->fence_reference(screen, fence, NULL);
521 *fence = (struct pipe_fence_handle *)new_fence;
547 static void si_flush_from_st(struct pipe_context *ctx, struct pipe_fence_handle **fence,
550 return si_flush_all_queues(ctx, fence, flags, false);
553 static void si_fence_server_signal(struct pipe_context *ctx, struct pipe_fence_handle *fence)
556 struct si_fence *sfence = (struct si_fence *)fence;
581 static void si_fence_server_sync(struct pipe_context *ctx, struct pipe_fence_handle *fence)
584 struct si_fence *sfence = (struct si_fence *)fence;
592 /* All unflushed commands will not start execution before this fence