From 21577571b37e68edc0422fbf80932588a4614abc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Nov 2014 17:39:04 -0800 Subject: vc4: Update for new kernel ABI with async execution and waits. Our submits now return immediately and you have to manually wait for things to complete if you want to (like a normal driver). --- src/gallium/drivers/vc4/vc4_context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_context.c') diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c index a6becaf..bb30c0e 100644 --- a/src/gallium/drivers/vc4/vc4_context.c +++ b/src/gallium/drivers/vc4/vc4_context.c @@ -322,6 +322,8 @@ vc4_flush(struct pipe_context *pctx) } } + vc4->last_emit_seqno = submit.seqno; + vc4_reset_cl(&vc4->bcl); vc4_reset_cl(&vc4->rcl); vc4_reset_cl(&vc4->shader_rec); @@ -350,7 +352,15 @@ static void vc4_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, unsigned flags) { + struct vc4_context *vc4 = vc4_context(pctx); + vc4_flush(pctx); + + if (fence) { + struct vc4_fence *f = vc4_fence_create(vc4->screen, + vc4->last_emit_seqno); + *fence = (struct pipe_fence_handle *)f; + } } /** -- cgit v1.1