[Bf-blender-cvs] [044cb7e] object_nodes: Fixed overzealous assert for input stack assignments in codegen.

Lukas Tönne noreply at git.blender.org
Wed Nov 25 09:31:41 CET 2015


Commit: 044cb7eaf0413709b25f3818eafad447b5cf1fe1
Author: Lukas Tönne
Date:   Wed Nov 25 09:29:39 2015 +0100
Branches: object_nodes
https://developer.blender.org/rB044cb7eaf0413709b25f3818eafad447b5cf1fe1

Fixed overzealous assert for input stack assignments in codegen.

For constant inputs no stack index is needed. Previous to node pruning
this did not trigger the assert because there were still pass nodes
allocating the stack indices.

===================================================================

M	source/blender/blenvm/compile/bvm_codegen.cc

===================================================================

diff --git a/source/blender/blenvm/compile/bvm_codegen.cc b/source/blender/blenvm/compile/bvm_codegen.cc
index 1dcbf3e..3deb9d7 100644
--- a/source/blender/blenvm/compile/bvm_codegen.cc
+++ b/source/blender/blenvm/compile/bvm_codegen.cc
@@ -442,13 +442,13 @@ Function *BVMCompiler::codegen_function(const NodeGraph &graph)
 		for (int i = 0; i < node.num_inputs(); ++i) {
 			const NodeSocket &input = node.type->inputs[i];
 			ConstSocketPair key(&node, input.name);
-			assert(input_index.find(key) != input_index.end());
 			
 			if (node.is_input_constant(i)) {
 				Value *value = node.find_input_value(i);
 				codegen_constant(value);
 			}
 			else {
+				assert(input_index.find(key) != input_index.end());
 				push_stack_index(input_index[key]);
 			}
 		}




More information about the Bf-blender-cvs mailing list