diff options
author | Rob Clark <robdclark@gmail.com> | 2017-01-30 13:10:36 -0500 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2017-03-13 16:23:06 +0000 |
commit | d4bf220581782f74dd75b281ddc4d2d7955cd75c (patch) | |
tree | 98001760e0b35bf52c5fc27854f17cc7bb3e7bf6 /cli | |
parent | b4daabd6aa0f377213b70b2558181aef9900637a (diff) |
retrace: support for dumping multiple snapshots (v3)
Usually if an app is using MRT, we want to dump (and diff) *all* the
render targets to track down where things are going wrong. Also dumps
depth and stencil buffers.
When the --mrt (or -m) argument is specified, all render targets plus
depth and/or stencil are dumped, with the suffix -mrtN/-z/-s. Otherwise
the behavior is as before, only mrt0 is dumped with no suffix.
Only implemented for GLDumper, since I don't know anything about D3D.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_dump_images.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/cli_dump_images.cpp b/cli/cli_dump_images.cpp index bf3dc566..2c20c981 100644 --- a/cli/cli_dump_images.cpp +++ b/cli/cli_dump_images.cpp @@ -52,6 +52,7 @@ usage(void) " which dumps an image for each frame)\n" " --call-nos[=BOOL] use call numbers in image filenames,\n" " otherwise use sequental numbers (default=yes)\n" + " -m, --mrt dump all MRTs and depth/stencil\n" " -o, --output=PREFIX prefix to use in naming output files\n" " (default is trace filename without extension)\n" "\n"; @@ -63,13 +64,14 @@ enum { }; const static char * -shortOptions = "ho:"; +shortOptions = "hmo:"; const static struct option longOptions[] = { {"help", no_argument, 0, 'h'}, {"calls", required_argument, 0, CALLS_OPT}, {"call-nos", optional_argument, 0, CALL_NOS_OPT}, + {"mrt", no_argument, 0, 'm'}, {"output", required_argument, 0, 'o'}, {0, 0, 0, 0} }; @@ -82,6 +84,7 @@ command(int argc, char *argv[]) const char *traceName = NULL; const char *output = NULL; std::string call_nos; + bool mrt = false; int opt; while ((opt = getopt_long(argc, argv, shortOptions, longOptions, NULL)) != -1) { @@ -96,6 +99,9 @@ command(int argc, char *argv[]) call_nos = "--call-nos="; call_nos.append(optarg); break; + case 'm': + mrt = true; + break; case 'o': output = optarg; break; @@ -140,6 +146,8 @@ command(int argc, char *argv[]) if (!call_nos.empty()) { opts.push_back(call_nos.c_str()); } + if (mrt) + opts.push_back("-m"); return executeRetrace(opts, traceName); } |