[Bf-blender-cvs] [1761091] object_nodes: Only insert functions into the function cache when use_cache argument is true.
Lukas Tönne
noreply at git.blender.org
Tue Apr 5 11:06:02 CEST 2016
Commit: 1761091ce68559d725e8a482a1ea79518e9a9edc
Author: Lukas Tönne
Date: Tue Apr 5 10:26:59 2016 +0200
Branches: object_nodes
https://developer.blender.org/rB1761091ce68559d725e8a482a1ea79518e9a9edc
Only insert functions into the function cache when use_cache argument is true.
===================================================================
M source/blender/blenvm/intern/bvm_api.cc
===================================================================
diff --git a/source/blender/blenvm/intern/bvm_api.cc b/source/blender/blenvm/intern/bvm_api.cc
index f64bc4d..36b7367 100644
--- a/source/blender/blenvm/intern/bvm_api.cc
+++ b/source/blender/blenvm/intern/bvm_api.cc
@@ -430,7 +430,9 @@ struct BVMFunction *BVM_gen_forcefield_function_bvm(bNodeTree *btree, bool use_c
BVMCompiler compiler;
fn = compiler.compile_function(graph);
- function_bvm_cache_set(btree, fn);
+ if (use_cache) {
+ function_bvm_cache_set(btree, fn);
+ }
}
bvm_lock.unlock();
@@ -1012,7 +1014,9 @@ struct BVMFunction *BVM_gen_texture_function_bvm(bNodeTree *btree, bool use_cach
BVMCompiler compiler;
fn = compiler.compile_function(graph);
- function_bvm_cache_set(btree, fn);
+ if (use_cache) {
+ function_bvm_cache_set(btree, fn);
+ }
}
bvm_lock.unlock();
@@ -1041,7 +1045,9 @@ struct BVMFunction *BVM_gen_texture_function_llvm(bNodeTree *btree, bool use_cac
LLVMCompiler compiler;
fn = compiler.compile_function(get_ntree_unique_function_name(btree), graph);
- function_llvm_cache_set(btree, fn);
+ if (use_cache) {
+ function_llvm_cache_set(btree, fn);
+ }
}
llvm_lock.unlock();
@@ -1152,7 +1158,9 @@ struct BVMFunction *BVM_gen_modifier_function_bvm(struct bNodeTree *btree, bool
BVMCompiler compiler;
fn = compiler.compile_function(graph);
- function_bvm_cache_set(btree, fn);
+ if (use_cache) {
+ function_bvm_cache_set(btree, fn);
+ }
}
bvm_lock.unlock();
@@ -1238,7 +1246,9 @@ struct BVMFunction *BVM_gen_dupli_function_bvm(struct bNodeTree *btree, bool use
BVMCompiler compiler;
fn = compiler.compile_function(graph);
- function_bvm_cache_set(btree, fn);
+ if (use_cache) {
+ function_bvm_cache_set(btree, fn);
+ }
}
bvm_lock.unlock();
More information about the Bf-blender-cvs
mailing list