[Bf-blender-cvs] [bcae5507b83] temp-parallel-multi-function: Merge branch 'temp-geometry-nodes-fields' into parallel-multi-function
Jacques Lucke
noreply at git.blender.org
Fri Sep 10 11:02:28 CEST 2021
Commit: bcae5507b83ef19acf409fa80c5b8c060f58b0f3
Author: Jacques Lucke
Date: Thu Sep 9 17:45:46 2021 +0200
Branches: temp-parallel-multi-function
https://developer.blender.org/rBbcae5507b83ef19acf409fa80c5b8c060f58b0f3
Merge branch 'temp-geometry-nodes-fields' into parallel-multi-function
===================================================================
===================================================================
diff --cc source/blender/functions/intern/field.cc
index 7b35593ad75,fa7dea97b7f..06730a8b830
--- a/source/blender/functions/intern/field.cc
+++ b/source/blender/functions/intern/field.cc
@@@ -271,18 -269,18 +271,20 @@@ Vector<const GVArray *> evaluate_fields
Span<GFieldRef> fields_to_evaluate,
IndexMask mask,
const FieldContext &context,
- Span<GVMutableArray *> dst_hints)
+ Span<GVMutableArray *> dst_varrays)
{
+ SCOPED_TIMER(__func__);
+
Vector<const GVArray *> r_varrays(fields_to_evaluate.size(), nullptr);
+ const int array_size = mask.min_array_size();
- /* Destination hints are optional. Create a small utility method to access them. */
- auto get_dst_hint_if_available = [&](int index) -> GVMutableArray * {
- if (dst_hints.is_empty()) {
+ /* Destination arrays are optional. Create a small utility method to access them. */
+ auto get_dst_varray_if_available = [&](int index) -> GVMutableArray * {
+ if (dst_varrays.is_empty()) {
return nullptr;
}
- return dst_hints[index];
+ BLI_assert(dst_varrays[index] == nullptr || dst_varrays[index]->size() >= array_size);
+ return dst_varrays[index];
};
/* Traverse the field tree and prepare some data that is used in later steps. */
More information about the Bf-blender-cvs
mailing list