Merge branch 'master' into blender2.8

This commit is contained in:
2018-03-12 17:31:46 +01:00
5 changed files with 18 additions and 7 deletions

View File

@@ -125,13 +125,17 @@ enum {
G_DEBUG_DEPSGRAPH_BUILD = (1 << 8), /* depsgraph construction messages */
G_DEBUG_DEPSGRAPH_EVAL = (1 << 9), /* depsgraph evaluation messages */
G_DEBUG_DEPSGRAPH_TAG = (1 << 10), /* depsgraph tagging messages */
G_DEBUG_DEPSGRAPH_NO_THREADS = (1 << 11), /* single threaded depsgraph */
G_DEBUG_DEPSGRAPH = (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_EVAL | G_DEBUG_DEPSGRAPH_TAG),
G_DEBUG_SIMDATA = (1 << 12), /* sim debug data display */
G_DEBUG_GPU_MEM = (1 << 13), /* gpu memory in status bar */
G_DEBUG_GPU = (1 << 14), /* gpu debug */
G_DEBUG_DEPSGRAPH_TIME = (1 << 11), /* depsgraph timing statistics and messages */
G_DEBUG_DEPSGRAPH_NO_THREADS = (1 << 12), /* single threaded depsgraph */
G_DEBUG_DEPSGRAPH = (G_DEBUG_DEPSGRAPH_BUILD |
G_DEBUG_DEPSGRAPH_EVAL |
G_DEBUG_DEPSGRAPH_TAG |
G_DEBUG_DEPSGRAPH_TIME),
G_DEBUG_SIMDATA = (1 << 13), /* sim debug data display */
G_DEBUG_GPU_MEM = (1 << 14), /* gpu memory in status bar */
G_DEBUG_GPU = (1 << 15), /* gpu debug */
G_DEBUG_IO = (1 << 13), /* IO Debugging (for Collada, ...)*/
G_DEBUG_GPU_SHADERS = (1 << 15), /* GLSL shaders */
G_DEBUG_GPU_SHADERS = (1 << 16), /* GLSL shaders */
};
#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \

View File

@@ -8524,6 +8524,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short
id->icon_id = 0;
id->newid = NULL; /* Needed because .blend may have been saved with crap value here... */
id->orig_id = NULL;
id->recalc = 0;
/* this case cannot be direct_linked: it's just the ID part */
if (bhead->code == ID_ID) {

View File

@@ -234,6 +234,7 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
if (BLI_gset_len(graph->entry_tags) == 0) {
return;
}
const bool do_time_debug = ((G.debug & G_DEBUG_DEPSGRAPH_TIME) != 0);
/* Set time for the current graph evaluation context. */
TimeSourceDepsNode *time_src = graph->find_time_source();
eval_ctx->depsgraph = (::Depsgraph *)graph;
@@ -243,7 +244,7 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
DepsgraphEvalState state;
state.eval_ctx = eval_ctx;
state.graph = graph;
state.do_stats = (G.debug_value != 0);
state.do_stats = do_time_debug;
/* Set up task scheduler and pull for threaded evaluation. */
TaskScheduler *task_scheduler;
bool need_free_scheduler;

View File

@@ -360,6 +360,7 @@ static PyGetSetDef bpy_app_getsets[] = {
{(char *)"debug_depsgraph_build", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_BUILD},
{(char *)"debug_depsgraph_eval", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_EVAL},
{(char *)"debug_depsgraph_tag", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_TAG},
{(char *)"debug_depsgraph_time", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_TIME},
{(char *)"debug_simdata", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_SIMDATA},
{(char *)"debug_gpumem", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_GPU_MEM},

View File

@@ -753,6 +753,8 @@ static const char arg_handle_debug_mode_generic_set_doc_depsgraph_build[] =
"\n\tEnable debug messages from dependency graph related on graph construction.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_tag[] =
"\n\tEnable debug messages from dependency graph related on tagging.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_time[] =
"\n\tEnable debug messages from dependency graph related on timing.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_eval[] =
"\n\tEnable debug messages from dependency graph related on evaluation.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_no_threads[] =
@@ -1848,6 +1850,8 @@ void main_args_setup(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
CB_EX(arg_handle_debug_mode_generic_set, depsgraph_eval), (void *)G_DEBUG_DEPSGRAPH_EVAL);
BLI_argsAdd(ba, 1, NULL, "--debug-depsgraph-tag",
CB_EX(arg_handle_debug_mode_generic_set, depsgraph_tag), (void *)G_DEBUG_DEPSGRAPH_TAG);
BLI_argsAdd(ba, 1, NULL, "--debug-depsgraph-time",
CB_EX(arg_handle_debug_mode_generic_set, depsgraph_time), (void *)G_DEBUG_DEPSGRAPH_TIME);
BLI_argsAdd(ba, 1, NULL, "--debug-depsgraph-no-threads",
CB_EX(arg_handle_debug_mode_generic_set, depsgraph_no_threads), (void *)G_DEBUG_DEPSGRAPH_NO_THREADS);
BLI_argsAdd(ba, 1, NULL, "--debug-gpumem",