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.
This commit is contained in:
Eric Anholt 2014-12-02 13:18:56 -08:00
parent c0e26c5d27
commit 34cf86bdc4
3 changed files with 11 additions and 0 deletions

View file

@ -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);

View file

@ -52,6 +52,8 @@ static const struct debug_named_value debug_options[] = {
"Skip actual hardware execution of commands" },
{ "always_flush", VC4_DEBUG_ALWAYS_FLUSH,
"Flush after each draw call" },
{ "always_sync", VC4_DEBUG_ALWAYS_SYNC,
"Wait for finish after each flush" },
{ NULL }
};

View file

@ -37,6 +37,7 @@ struct vc4_bo;
#define VC4_DEBUG_PERF 0x0020
#define VC4_DEBUG_NORAST 0x0040
#define VC4_DEBUG_ALWAYS_FLUSH 0x0080
#define VC4_DEBUG_ALWAYS_SYNC 0x0100
#define VC4_MAX_MIP_LEVELS 12
#define VC4_MAX_TEXTURE_SAMPLERS 16