Lines Matching refs:fence
96 struct drm_i915_gem_exec_fence *fence =
99 *fence = (struct drm_i915_gem_exec_fence){
133 struct drm_i915_gem_exec_fence *fence =
136 assert(fence->flags & I915_EXEC_FENCE_WAIT);
155 memcpy(fence, nth_fence, sizeof(*fence));
172 struct pipe_fence_handle *fence)
176 for (unsigned i = 0; i < ARRAY_SIZE(fence->fine); i++)
177 crocus_fine_fence_reference(screen, &fence->fine[i], NULL);
179 free(fence);
226 struct pipe_fence_handle *fence = calloc(1, sizeof(*fence));
227 if (!fence)
230 pipe_reference_init(&fence->ref, 1);
233 fence->unflushed_ctx = ctx;
241 crocus_fine_fence_reference(screen, &fence->fine[b], fine);
251 crocus_fine_fence_reference(screen, &fence->fine[b],
257 *out_fence = fence;
261 crocus_fence_await(struct pipe_context *ctx, struct pipe_fence_handle *fence)
266 if (ctx && ctx == fence->unflushed_ctx)
269 for (unsigned i = 0; i < ARRAY_SIZE(fence->fine); i++) {
270 struct crocus_fine_fence *fine = fence->fine[i];
279 * fence to have gone by. But any currently queued work doesn't
320 struct pipe_fence_handle *fence, uint64_t timeout)
326 /* If we created the fence with PIPE_FLUSH_DEFERRED, we may not have
331 * the context the fence was created with. It may be NULL, so we check
334 if (ctx && ctx == fence->unflushed_ctx) {
336 struct crocus_fine_fence *fine = fence->fine[i];
345 /* The fence is no longer deferred. */
346 fence->unflushed_ctx = NULL;
350 uint32_t handles[ARRAY_SIZE(fence->fine)];
351 for (unsigned i = 0; i < ARRAY_SIZE(fence->fine); i++) {
352 struct crocus_fine_fence *fine = fence->fine[i];
369 if (fence->unflushed_ctx) {
370 /* This fence had a deferred flush from another context. We can't
391 __s32 fence;
410 .name = "crocus fence",
412 .fence = -1,
419 return args.fence;
424 struct pipe_fence_handle *fence)
430 if (fence->unflushed_ctx)
433 for (unsigned i = 0; i < ARRAY_SIZE(fence->fine); i++) {
434 struct crocus_fine_fence *fine = fence->fine[i];
450 /* Our fence has no syncobj's recorded. This means that all of the
453 * export such a fence. So export a dummy already-signalled syncobj.
512 * seqno for an imported fence. So, create a fake one which always
521 struct pipe_fence_handle *fence = calloc(1, sizeof(*fence));
522 if (!fence) {
528 pipe_reference_init(&fence->ref, 1);
529 fence->fine[0] = fine;
531 *out = fence;
535 crocus_fence_signal(struct pipe_context *ctx, struct pipe_fence_handle *fence)
539 if (ctx == fence->unflushed_ctx)
543 for (unsigned i = 0; i < ARRAY_SIZE(fence->fine); i++) {
544 struct crocus_fine_fence *fine = fence->fine[i];
546 /* already signaled fence skipped */