summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-11-19 17:39:04 -0800
committerEric Anholt <eric@anholt.net>2014-11-20 13:07:07 -0800
commit21577571b37e68edc0422fbf80932588a4614abc (patch)
tree031a8f9d5adbb2c2bab7d0fd65137e1d7396cd36 /src/gallium/drivers/vc4/vc4_context.c
parent390799c496d363e7476afb0dbb8f28cbc6e20807 (diff)
downloadexternal_mesa3d-21577571b37e68edc0422fbf80932588a4614abc.zip
external_mesa3d-21577571b37e68edc0422fbf80932588a4614abc.tar.gz
external_mesa3d-21577571b37e68edc0422fbf80932588a4614abc.tar.bz2
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).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c10
1 files changed, 10 insertions, 0 deletions
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;
+ }
}
/**