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:
authorDalai Felinto <dfelinto@gmail.com>2018-06-07 13:47:16 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-06-07 13:56:34 +0300
commit3126f85d26448d7e8698724a563e0f5a08f4f34f (patch)
tree54adb333534d34168db9642ac845dcae8e9f912b /source/blender/makesrna/intern/rna_nodetree.c
parentd1474371facd1dd975603954c310547c9d618fc0 (diff)
Fix T55062: Depsgraph: Crash with COW with EEVEE viewport
We now remove the shader for every update. So at the moment the whole point of UBO (Uniform Buffer Objects) is that they are more efficient than individual uniforms. Next steps is a harmless refactor to stopping UBO from referring to original data in the UBO, and simply copying it. It would also be interesting to make the final shader more granular as far as the library and required functions are concerned. Even if this doesn't impact performance, it should give us smaller easy to debug shaders (a simple shader now has > 5k lines!). If performance for animated values is measureable slower after this commit we can port the shader creation CPU side to the depsgraph - localizing the tree, hashing, lookup, ... Additionally we can stick to update the UBO when the material changes but not its topology. This is very trick because of localized trees. So we will only re-visit this if profiling hints at any benefit from it.
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 9cb5b2d40d2..4f928a9a831 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2307,31 +2307,13 @@ static void rna_NodeSocketStandard_vector_range(PointerRNA *ptr, float *min, flo
*softmax = dval->max;
}
-static void rna_NodeSocket_value_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- bNodeTree *ntree = (bNodeTree *)ptr->id.data;
- bNodeSocket *sock = ptr->data;
-
- if (ntree->type == NTREE_SHADER) {
- DEG_id_tag_update_ex(bmain, &ntree->id, DEG_TAG_SHADING_UPDATE);
- WM_main_add_notifier(NC_MATERIAL | ND_SHADING, NULL);
-
- if (sock->type == SOCK_STRING) {
- rna_NodeSocket_update(bmain, scene, ptr);
- }
- }
- else {
- rna_NodeSocket_update(bmain, scene, ptr);
- }
-}
-
/* using a context update function here, to avoid searching the node if possible */
static void rna_NodeSocketStandard_value_update(struct bContext *C, PointerRNA *ptr)
{
bNode *node;
/* default update */
- rna_NodeSocket_value_update(CTX_data_main(C), CTX_data_scene(C), ptr);
+ rna_NodeSocket_update(CTX_data_main(C), CTX_data_scene(C), ptr);
/* try to use node from context, faster */
node = CTX_data_pointer_get(C, "node").data;