+static struct pipe_fence_handle * fence_create(struct fd_context *ctx,
+ struct fd_batch *batch, uint32_t timestamp, int fence_fd)
+{
+ struct pipe_fence_handle *fence;
+
+ fence = CALLOC_STRUCT(pipe_fence_handle);
+ if (!fence)
+ return NULL;
+
+ pipe_reference_init(&fence->reference, 1);
+
+ fence->batch = batch;
+ fence->pipe = fd_pipe_ref(ctx->pipe);
+ fence->screen = ctx->screen;
+ fence->timestamp = timestamp;
+ fence->fence_fd = fence_fd;
+
+ return fence;
+}
+