gallium/hud: append results to files instead of overwriting them
authorMarek Olšák <marek.olsak@amd.com>
Sun, 11 Jun 2023 05:10:09 +0000 (01:10 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Jun 2023 17:59:05 +0000 (13:59 -0400)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23706>

src/gallium/auxiliary/hud/hud_context.c

index bc31353..b951c06 100644 (file)
@@ -1082,7 +1082,7 @@ hud_graph_set_dump_file(struct hud_graph *gr, const char *hud_dump_dir, bool to_
          strcpy(dump_file, hud_dump_dir);
          strcat(dump_file, PATH_SEP);
          strcat_without_spaces(dump_file, gr->name);
-         gr->fd = fopen(dump_file, "w+");
+         gr->fd = fopen(dump_file, "a+");
          free(dump_file);
       }
    } else if (to_stdout) {