Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-21 13:17:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-21 13:17:34 +0300
commit9f0d067c2e9c8dcb4c40b880b0bbcf8ad31b1f55 (patch)
tree33a66b8fa1aa6a4cd76b64e835819743ff05a9fa
parente3ef782af5d5255093d00cdc261d93dd3d8a5c40 (diff)
parentf6b2fbb02922e9c303b95ffbdd93cd047a640338 (diff)
Merge branch 'master' into blender2.8
-rw-r--r--intern/cycles/device/device_cuda.cpp4
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_debug.h2
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc30
-rw-r--r--source/blender/depsgraph/intern/depsgraph_eval.cc3
-rw-r--r--source/blender/depsgraph/intern/depsgraph_intern.h3
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node.cc6
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node.h31
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.h13
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_operation.cc1
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_operation.h1
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c2
11 files changed, 28 insertions, 68 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 2e5f47002e8..47c09dfebf9 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -1372,8 +1372,8 @@ public:
void *args[] = {&task->render_buffer.samples,
&task->tiles_mem.device_pointer,
- &mean_offset,
- &variance_offset,
+ &mean_offset,
+ &variance_offset,
&mean_ptr,
&variance_ptr,
&task->rect,
diff --git a/source/blender/depsgraph/DEG_depsgraph_debug.h b/source/blender/depsgraph/DEG_depsgraph_debug.h
index bd03874436b..93487cce645 100644
--- a/source/blender/depsgraph/DEG_depsgraph_debug.h
+++ b/source/blender/depsgraph/DEG_depsgraph_debug.h
@@ -53,7 +53,7 @@ void DEG_stats_simple(const struct Depsgraph *graph,
/* ************************************************ */
/* Diagram-Based Graph Debugging */
-void DEG_debug_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label, bool show_eval);
+void DEG_debug_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label);
/* ************************************************ */
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
index f5772124088..68c2eb12914 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
@@ -118,7 +118,7 @@ static int deg_debug_node_color_index(const DepsNode *node)
break;
}
/* Do others based on class. */
- switch (node->tclass) {
+ switch (node->get_class()) {
case DEG_NODE_CLASS_OPERATION:
return 4;
case DEG_NODE_CLASS_COMPONENT:
@@ -142,7 +142,6 @@ static int deg_debug_node_color_index(const DepsNode *node)
struct DebugContext {
FILE *file;
bool show_tags;
- bool show_eval_priority;
};
static void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...) ATTR_PRINTF_FORMAT(2, 3);
@@ -205,7 +204,7 @@ static void deg_debug_graphviz_node_color(const DebugContext &ctx,
const char *color_update = "dodgerblue3";
const char *color = color_default;
if (ctx.show_tags) {
- if (node->tclass == DEG_NODE_CLASS_OPERATION) {
+ if (node->get_class() == DEG_NODE_CLASS_OPERATION) {
OperationDepsNode *op_node = (OperationDepsNode *)node;
if (op_node->flag & DEPSOP_FLAG_DIRECTLY_MODIFIED) {
color = color_modified;
@@ -226,7 +225,7 @@ static void deg_debug_graphviz_node_penwidth(const DebugContext &ctx,
float penwidth_update = 4.0f;
float penwidth = penwidth_default;
if (ctx.show_tags) {
- if (node->tclass == DEG_NODE_CLASS_OPERATION) {
+ if (node->get_class() == DEG_NODE_CLASS_OPERATION) {
OperationDepsNode *op_node = (OperationDepsNode *)node;
if (op_node->flag & DEPSOP_FLAG_DIRECTLY_MODIFIED) {
penwidth = penwidth_modified;
@@ -264,14 +263,14 @@ static void deg_debug_graphviz_node_style(const DebugContext &ctx, const DepsNod
{
const char *base_style = "filled"; /* default style */
if (ctx.show_tags) {
- if (node->tclass == DEG_NODE_CLASS_OPERATION) {
+ if (node->get_class() == DEG_NODE_CLASS_OPERATION) {
OperationDepsNode *op_node = (OperationDepsNode *)node;
if (op_node->flag & (DEPSOP_FLAG_DIRECTLY_MODIFIED | DEPSOP_FLAG_NEEDS_UPDATE)) {
base_style = "striped";
}
}
}
- switch (node->tclass) {
+ switch (node->get_class()) {
case DEG_NODE_CLASS_GENERIC:
deg_debug_fprintf(ctx, "\"%s\"", base_style);
break;
@@ -289,22 +288,11 @@ static void deg_debug_graphviz_node_single(const DebugContext &ctx,
{
const char *shape = "box";
string name = node->identifier();
- float priority = -1.0f;
- if (ctx.show_eval_priority && node->tclass == DEG_NODE_CLASS_OPERATION) {
- priority = ((OperationDepsNode *)node)->eval_priority;
- }
deg_debug_fprintf(ctx, "// %s\n", name.c_str());
deg_debug_fprintf(ctx, "\"node_%p\"", node);
deg_debug_fprintf(ctx, "[");
// deg_debug_fprintf(ctx, "label=<<B>%s</B>>", name);
- if (priority >= 0.0f) {
- deg_debug_fprintf(ctx, "label=<%s<BR/>(<I>%.2f</I>)>",
- name.c_str(),
- priority);
- }
- else {
- deg_debug_fprintf(ctx, "label=<%s>", name.c_str());
- }
+ deg_debug_fprintf(ctx, "label=<%s>", name.c_str());
deg_debug_fprintf(ctx, ",fontname=\"%s\"", deg_debug_graphviz_fontname);
deg_debug_fprintf(ctx, ",fontsize=%f", deg_debug_graphviz_node_label_size);
deg_debug_fprintf(ctx, ",shape=%s", shape);
@@ -439,7 +427,7 @@ static bool deg_debug_graphviz_is_cluster(const DepsNode *node)
static bool deg_debug_graphviz_is_owner(const DepsNode *node,
const DepsNode *other)
{
- switch (node->tclass) {
+ switch (node->get_class()) {
case DEG_NODE_CLASS_COMPONENT:
{
ComponentDepsNode *comp_node = (ComponentDepsNode *)node;
@@ -529,7 +517,7 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx,
} // namespace DEG
-void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label, bool show_eval)
+void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label)
{
if (!graph) {
return;
@@ -539,8 +527,6 @@ void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label, bool
DEG::DebugContext ctx;
ctx.file = f;
- ctx.show_tags = show_eval;
- ctx.show_eval_priority = show_eval;
DEG::deg_debug_fprintf(ctx, "digraph depgraph {" NL);
DEG::deg_debug_fprintf(ctx, "rankdir=LR;" NL);
diff --git a/source/blender/depsgraph/intern/depsgraph_eval.cc b/source/blender/depsgraph/intern/depsgraph_eval.cc
index 0603e467192..ad1a850a807 100644
--- a/source/blender/depsgraph/intern/depsgraph_eval.cc
+++ b/source/blender/depsgraph/intern/depsgraph_eval.cc
@@ -52,9 +52,6 @@ extern "C" {
#include "intern/depsgraph.h"
-/* Unfinished and unused, and takes quite some pre-processing time. */
-#undef USE_EVAL_PRIORITY
-
/* ****************** */
/* Evaluation Context */
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index 5db138ecda8..df5e51a3910 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -60,7 +60,6 @@ namespace DEG {
/* Typeinfo Struct (nti) */
struct DepsNodeFactory {
virtual eDepsNode_Type type() const = 0;
- virtual eDepsNode_Class tclass() const = 0;
virtual const char *tname() const = 0;
virtual int id_recalc_tag() const = 0;
@@ -72,7 +71,6 @@ struct DepsNodeFactory {
template <class NodeType>
struct DepsNodeFactoryImpl : public DepsNodeFactory {
eDepsNode_Type type() const { return NodeType::typeinfo.type; }
- eDepsNode_Class tclass() const { return NodeType::typeinfo.tclass; }
const char *tname() const { return NodeType::typeinfo.tname; }
int id_recalc_tag() const { return NodeType::typeinfo.id_recalc_tag; }
@@ -82,7 +80,6 @@ struct DepsNodeFactoryImpl : public DepsNodeFactory {
/* populate base node settings */
node->type = type();
- node->tclass = tclass();
if (name[0] != '\0') {
/* set name if provided ... */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node.cc b/source/blender/depsgraph/intern/nodes/deg_node.cc
index 9caa7352587..7e2da5d34b6 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node.cc
@@ -58,12 +58,6 @@ DepsNode::TypeInfo::TypeInfo(eDepsNode_Type type,
tname(tname),
id_recalc_tag(id_recalc_tag)
{
- if (type == DEG_NODE_TYPE_OPERATION)
- this->tclass = DEG_NODE_CLASS_OPERATION;
- else if (type < DEG_NODE_TYPE_PARAMETERS)
- this->tclass = DEG_NODE_CLASS_GENERIC;
- else
- this->tclass = DEG_NODE_CLASS_COMPONENT;
}
DepsNode::DepsNode()
diff --git a/source/blender/depsgraph/intern/nodes/deg_node.h b/source/blender/depsgraph/intern/nodes/deg_node.h
index 54042ae4a1b..05c787fba11 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node.h
@@ -52,23 +52,10 @@ struct DepsNode {
/* Helper class for static typeinfo in subclasses. */
struct TypeInfo {
TypeInfo(eDepsNode_Type type, const char *tname, int id_recalc_tag = 0);
-
eDepsNode_Type type;
- eDepsNode_Class tclass;
const char *tname;
-
int id_recalc_tag;
};
-
- /* Identifier - mainly for debugging purposes. */
- const char *name;
-
- /* Structural type of node. */
- eDepsNode_Type type;
-
- /* Type of data/behaviour represented by node... */
- eDepsNode_Class tclass;
-
/* Relationships between nodes
* The reason why all depsgraph nodes are descended from this type (apart
* from basic serialization benefits - from the typeinfo) is that we can have
@@ -76,9 +63,12 @@ struct DepsNode {
*/
typedef vector<DepsRelation *> Relations;
+ /* Identifier - mainly for debugging purposes. */
+ const char *name;
+ /* Structural type of node. */
+ eDepsNode_Type type;
/* Nodes which this one depends on. */
Relations inlinks;
-
/* Nodes which depend on this one. */
Relations outlinks;
@@ -87,7 +77,6 @@ struct DepsNode {
int tag;
/* Methods. */
-
DepsNode();
virtual ~DepsNode();
@@ -101,6 +90,18 @@ struct DepsNode {
virtual OperationDepsNode *get_entry_operation() { return NULL; }
virtual OperationDepsNode *get_exit_operation() { return NULL; }
+
+ virtual eDepsNode_Class get_class() const {
+ if (type == DEG_NODE_TYPE_OPERATION) {
+ return DEG_NODE_CLASS_OPERATION;
+ }
+ else if (type < DEG_NODE_TYPE_PARAMETERS) {
+ return DEG_NODE_CLASS_GENERIC;
+ }
+ else {
+ return DEG_NODE_CLASS_COMPONENT;
+ }
+ }
};
/* Macros for common static typeinfo. */
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.h b/source/blender/depsgraph/intern/nodes/deg_node_component.h
index 8c747bc3e32..b8009cc0a7f 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.h
@@ -124,19 +124,6 @@ struct ComponentDepsNode : public DepsNode {
void tag_update(Depsgraph *graph);
- /* Evaluation Context Management .................. */
-
- /* Initialize component's evaluation context used for the specified
- * purpose.
- */
- virtual bool eval_context_init(EvaluationContext * /*eval_ctx*/) { return false; }
- /* Free data in component's evaluation context which is used for
- * the specified purpose
- *
- * NOTE: this does not free the actual context in question
- */
- virtual void eval_context_free(EvaluationContext * /*eval_ctx*/) {}
-
OperationDepsNode *get_entry_operation();
OperationDepsNode *get_exit_operation();
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_operation.cc b/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
index 0fc87a52005..cbc0fbb4241 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_operation.cc
@@ -45,7 +45,6 @@ namespace DEG {
/* Inner Nodes */
OperationDepsNode::OperationDepsNode() :
- eval_priority(0.0f),
flag(0),
customdata_mask(0)
{
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_operation.h b/source/blender/depsgraph/intern/nodes/deg_node_operation.h
index ffb95a53b5d..c172f73be5f 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/nodes/deg_node_operation.h
@@ -76,7 +76,6 @@ struct OperationDepsNode : public DepsNode {
/* How many inlinks are we still waiting on before we can be evaluated. */
uint32_t num_links_pending;
- float eval_priority;
bool scheduled;
/* Identifier for the operation being performed. */
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c
index ffa75dd75cb..a5b8845b120 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -126,7 +126,7 @@ static void rna_Depsgraph_debug_graphviz(Depsgraph *graph, const char *filename)
if (f == NULL) {
return;
}
- DEG_debug_graphviz(graph, f, "Depsgraph", false);
+ DEG_debug_graphviz(graph, f, "Depsgraph");
fclose(f);
}