Cycles: add profiling command line argument to standalone
Like --cycles-print-stats for Blender.
This commit is contained in:
parent
1a8a69d318
commit
e0315a5ef0
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue