[Bf-blender-cvs] [e559a99a041] blender2.8: Eevee: Fix T53413: Crash when using displacement bump relink.
Clément Foucault
noreply at git.blender.org
Tue Nov 28 17:22:45 CET 2017
Commit: e559a99a04131ac0e5edea063d955128815627b8
Author: Clément Foucault
Date: Tue Nov 28 17:22:15 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBe559a99a04131ac0e5edea063d955128815627b8
Eevee: Fix T53413: Crash when using displacement bump relink.
ntree_shader_relink_displacement is creating a transient node that does not have a correct original to point to.
In this case we revert to constant uniform.
===================================================================
M source/blender/gpu/intern/gpu_codegen.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index bc91df895c8..9e4daa2a036 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1589,6 +1589,15 @@ static GPUNodeLink *gpu_uniformbuffer_link(
GPUMaterial *mat, bNode *node, GPUNodeStack *stack, const int index, const eNodeSocketInOut in_out)
{
bNodeSocket *socket;
+
+ /* Some nodes can have been create on the fly and does
+ * not have an original to point to. (i.e. the bump from
+ * ntree_shader_relink_displacement). In this case just
+ * revert to static constant folding. */
+ if (node->original == NULL) {
+ return NULL;
+ }
+
if (in_out == SOCK_IN) {
socket = BLI_findlink(&node->original->inputs, index);
}
More information about the Bf-blender-cvs
mailing list