diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-04-29 19:00:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-04-29 19:08:41 +0300 |
commit | e0315a5ef0fda1773d27c61f439b5598937a3357 (patch) | |
tree | b0a122b1b5f4e365a5c4d0d6a051c2653d9eaf36 /intern/cycles | |
parent | 1a8a69d3187fe513b34c8e31749fa1219750cff4 (diff) |
Cycles: add profiling command line argument to standalone
Like --cycles-print-stats for Blender.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/app/cycles_standalone.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index ed512aa2330..87ab84eb209 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -369,7 +369,7 @@ static void options_parse(int argc, const char **argv) /* parse options */ ArgParse ap; - bool help = false, debug = false, version = false; + bool help = false, profile = false, debug = false, version = false; int verbosity = 1; ap.options("Usage: cycles [options] file.xml", @@ -411,6 +411,9 @@ static void options_parse(int argc, const char **argv) "--list-devices", &list, "List information about all available devices", + "--profile", + &profile, + "Enable profile logging", #ifdef WITH_CYCLES_LOGGING "--debug", &debug, @@ -460,6 +463,8 @@ static void options_parse(int argc, const char **argv) exit(EXIT_SUCCESS); } + options.session_params.use_profiling = profile; + if (ssname == "osl") options.scene_params.shadingsystem = SHADINGSYSTEM_OSL; else if (ssname == "svm") |