Depsgraph: Add code for timing despgraph builder
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
// #define DEBUG_TIME
|
||||
|
||||
extern "C" {
|
||||
#include "DNA_cachefile_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
@@ -41,6 +43,11 @@ extern "C" {
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_ghash.h"
|
||||
|
||||
#ifdef DEBUG_TIME
|
||||
# include "PIL_time.h"
|
||||
# include "PIL_time_utildefines.h"
|
||||
#endif
|
||||
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_collision.h"
|
||||
#include "BKE_effect.h"
|
||||
@@ -190,6 +197,10 @@ void DEG_add_special_eval_flag(Depsgraph *graph, ID *id, short flag)
|
||||
*/
|
||||
void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
|
||||
{
|
||||
#ifdef DEBUG_TIME
|
||||
TIMEIT_START(DEG_graph_build_from_scene);
|
||||
#endif
|
||||
|
||||
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
|
||||
|
||||
/* 1) Generate all the nodes in the graph first */
|
||||
@@ -239,6 +250,10 @@ void DEG_graph_build_from_scene(Depsgraph *graph, Main *bmain, Scene *scene)
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_TIME
|
||||
TIMEIT_END(DEG_graph_build_from_scene);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Tag graph relations for update. */
|
||||
|
||||
Reference in New Issue
Block a user