static FILE *
dd_get_file_stream(struct dd_context *dctx)
{
+ struct dd_screen *dscreen = dd_screen(dctx->base.screen);
struct pipe_screen *screen = dctx->pipe->screen;
- FILE *f = dd_get_debug_file();
+ FILE *f = dd_get_debug_file(dscreen->verbose);
if (!f)
return NULL;
puts("");
puts("Usage:");
puts("");
- puts(" GALLIUM_DDEBUG=\"always [noflush]\"");
+ puts(" GALLIUM_DDEBUG=\"always [noflush] [verbose]\"");
puts(" Flush and dump context and driver information after every draw call into");
puts(" $HOME/"DD_DIR"/.");
puts("");
- puts(" GALLIUM_DDEBUG=\"[timeout in ms] [noflush]\"");
+ puts(" GALLIUM_DDEBUG=\"[timeout in ms] [noflush] [verbose]\"");
puts(" Flush and detect a device hang after every draw call based on the given");
puts(" fence timeout and dump context and driver information into");
puts(" $HOME/"DD_DIR"/ when a hang is detected.");
puts("");
puts(" If 'noflush' is specified, do not flush on every draw call. In hang");
puts(" detection mode, this only detect hangs in pipe->flush.");
+ puts(" If 'verbose' is specified, additional information is written to stderr.");
puts("");
puts(" GALLIUM_DDEBUG_SKIP=[count]");
puts(" Skip flush and hang detection for the given initial number of draw calls.");
dscreen->timeout_ms = timeout;
dscreen->mode = dump_always ? DD_DUMP_ALL_CALLS : DD_DETECT_HANGS;
dscreen->no_flush = no_flush;
+ dscreen->verbose = strstr(option, "verbose") != NULL;
switch (dscreen->mode) {
case DD_DUMP_ALL_CALLS:
#define DD_DIR "ddebug_dumps"
static inline FILE *
-dd_get_debug_file()
+dd_get_debug_file(bool verbose)
{
static unsigned index;
char proc_name[128], dir[256], name[512];
return NULL;
}
+ if (verbose)
+ fprintf(stderr, "dd: dumping to file %s\n", name);
+
return f;
}