diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 768a323a169..12ae5c502e4 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -149,6 +149,10 @@ # include "libmv-capi.h" #endif +#ifdef WITH_CYCLES_LOGGING +# include "CCL_api.h" +#endif + /* from buildinfo.c */ #ifdef BUILD_DATE extern char build_date[]; @@ -309,6 +313,9 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) #ifdef WITH_LIBMV BLI_argsPrintArgDoc(ba, "--debug-libmv"); #endif +#ifdef WITH_CYCLES_LOGGING + BLI_argsPrintArgDoc(ba, "--debug-cycles"); +#endif BLI_argsPrintArgDoc(ba, "--debug-memory"); BLI_argsPrintArgDoc(ba, "--debug-jobs"); BLI_argsPrintArgDoc(ba, "--debug-python"); @@ -450,6 +457,15 @@ static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *U } #endif +#ifdef WITH_CYCLES_LOGGING +static int debug_mode_cycles(int UNUSED(argc), const char **UNUSED(argv), + void *UNUSED(data)) +{ + CCL_start_debug_logging(); + return 0; +} +#endif + static int debug_mode_memory(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) { MEM_set_memory_debug(); @@ -887,6 +903,8 @@ static int set_verbosity(int argc, const char **argv, void *UNUSED(data)) #ifdef WITH_LIBMV libmv_setLoggingVerbosity(level); +#elif defined(WITH_CYCLES_LOGGING) + CCL_logging_verbosity_set(level); #else (void)level; #endif @@ -1419,6 +1437,9 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) #ifdef WITH_LIBMV BLI_argsAdd(ba, 1, NULL, "--debug-libmv", "\n\tEnable debug messages from libmv library", debug_mode_libmv, NULL); #endif +#ifdef WITH_CYCLES_LOGGING + BLI_argsAdd(ba, 1, NULL, "--debug-cycles", "\n\tEnable debug messages from Cycles", debug_mode_cycles, NULL); +#endif BLI_argsAdd(ba, 1, NULL, "--debug-memory", "\n\tEnable fully guarded memory allocation and debugging", debug_mode_memory, NULL); BLI_argsAdd(ba, 1, NULL, "--debug-value", "<value>\n\tSet debug value of <value> on startup\n", set_debug_value, NULL); @@ -1508,9 +1529,9 @@ int main( #endif #ifdef WIN32 - /* FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it. */ + /* FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it. */ # if defined(_MSC_VER) && _MSC_VER >= 1800 && defined(_M_X64) - _set_FMA3_enable(0); + _set_FMA3_enable(0); # endif /* Win32 Unicode Args */ @@ -1583,6 +1604,8 @@ int main( #ifdef WITH_LIBMV libmv_initLogging(argv[0]); +#elif defined(WITH_CYCLES_LOGGING) + CCL_init_logging(argv[0]); #endif setCallbacks(); |