ddebug: print the command line to all logs (v2)
authorMarek Olšák <marek.olsak@amd.com>
Sat, 30 Jul 2016 12:56:28 +0000 (14:56 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Aug 2016 15:46:46 +0000 (17:46 +0200)
for piglit with the pipelined hang detection mode

v2: rebase on top of Brian's commit

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/ddebug/dd_draw.c

index 517e525f03a431e2c24494829d9d281f8e5788d4..c1bfdaf686582c350396beb0f27cb48397345124 100644 (file)
@@ -43,10 +43,14 @@ static FILE *
 dd_get_file_stream(struct dd_screen *dscreen, unsigned apitrace_call_number)
 {
    struct pipe_screen *screen = dscreen->screen;
+   char cmd_line[4096];
+
    FILE *f = dd_get_debug_file(dscreen->verbose);
    if (!f)
       return NULL;
 
+   if (os_get_command_line(cmd_line, sizeof(cmd_line)))
+      fprintf(f, "Command: %s\n", cmd_line);
    fprintf(f, "Driver vendor: %s\n", screen->get_vendor(screen));
    fprintf(f, "Device vendor: %s\n", screen->get_device_vendor(screen));
    fprintf(f, "Device name: %s\n\n", screen->get_name(screen));