summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-12-02 13:18:56 -0800
committerEric Anholt <[email protected]>2014-12-05 10:43:14 -0800
commit34cf86bdc48e1b350437fe831fedd4632f4e06c2 (patch)
tree077250808d4a79e897b5b06018a7753a6ab03fc6 /src/gallium/drivers/vc4/vc4_context.c
parentc0e26c5d272d48c98ae50b9b5358492e76138657 (diff)
vc4: Add a debug flag for waiting for sync on submit.
This is nice when you're tracking down which command list is hanging the GPU.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.c b/src/gallium/drivers/vc4/vc4_context.c
index bb30c0e8ca7..b26c07127a9 100644
--- a/src/gallium/drivers/vc4/vc4_context.c
+++ b/src/gallium/drivers/vc4/vc4_context.c
@@ -324,6 +324,14 @@ vc4_flush(struct pipe_context *pctx)
vc4->last_emit_seqno = submit.seqno;
+ if (vc4_debug & VC4_DEBUG_ALWAYS_SYNC) {
+ if (!vc4_wait_seqno(vc4->screen, vc4->last_emit_seqno,
+ PIPE_TIMEOUT_INFINITE)) {
+ fprintf(stderr, "Wait failed.\n");
+ abort();
+ }
+ }
+
vc4_reset_cl(&vc4->bcl);
vc4_reset_cl(&vc4->rcl);
vc4_reset_cl(&vc4->shader_rec);