summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug/dd_screen.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:39:01 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 14:01:03 +0100
commitb07569ad8b7bbe6ea33c984013a2f2607cd7ddaf (patch)
treea5d01eaa12be38d6ed0b5af5b7089f28cb69f16a /src/gallium/drivers/ddebug/dd_screen.c
parent18fd2a859de51353187f993ea2852bebe1ea5734 (diff)
ddebug: optionally handle transfer commands like draws
Transfer commands can have associated GPU operations. Enabled by passing GALLIUM_DDEBUG=transfers. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ddebug/dd_screen.c')
-rw-r--r--src/gallium/drivers/ddebug/dd_screen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c
index 11d1d8c1e9c..5b2be28a969 100644
--- a/src/gallium/drivers/ddebug/dd_screen.c
+++ b/src/gallium/drivers/ddebug/dd_screen.c
@@ -428,6 +428,7 @@ ddebug_screen_create(struct pipe_screen *screen)
const char *option;
bool flush = false;
bool verbose = false;
+ bool transfers = false;
unsigned timeout = 1000;
unsigned apitrace_dump_call = 0;
enum dd_dump_mode mode = DD_DUMP_ONLY_HANGS;
@@ -441,7 +442,7 @@ ddebug_screen_create(struct pipe_screen *screen)
puts("");
puts("Usage:");
puts("");
- puts(" GALLIUM_DDEBUG=\"[<timeout in ms>] [(always|apitrace <call#)] [flush] [verbose]\"");
+ puts(" GALLIUM_DDEBUG=\"[<timeout in ms>] [(always|apitrace <call#)] [flush] [transfers] [verbose]\"");
puts(" GALLIUM_DDEBUG_SKIP=[count]");
puts("");
puts("Dump context and driver information of draw calls into");
@@ -455,6 +456,9 @@ ddebug_screen_create(struct pipe_screen *screen)
puts("always");
puts(" Dump information about all draw calls.");
puts("");
+ puts("transfers");
+ puts(" Also dump and do hang detection on transfers.");
+ puts("");
puts("apitrace <call#>");
puts(" Dump information about the draw call corresponding to the given");
puts(" apitrace call number and exit.");
@@ -485,6 +489,8 @@ ddebug_screen_create(struct pipe_screen *screen)
mode = DD_DUMP_ALL_CALLS;
} else if (match_word(&option, "flush")) {
flush = true;
+ } else if (match_word(&option, "transfers")) {
+ transfers = true;
} else if (match_word(&option, "verbose")) {
verbose = true;
} else if (match_word(&option, "apitrace")) {
@@ -556,6 +562,7 @@ ddebug_screen_create(struct pipe_screen *screen)
dscreen->timeout_ms = timeout;
dscreen->dump_mode = mode;
dscreen->flush_always = flush;
+ dscreen->transfers = transfers;
dscreen->verbose = verbose;
dscreen->apitrace_dump_call = apitrace_dump_call;