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:
authorJacques Lucke <mail@jlucke.com>2019-12-22 12:58:28 +0300
committerJacques Lucke <mail@jlucke.com>2019-12-22 12:58:28 +0300
commit9c68e2ecc92aa87798c6e2f87c76c6fdcfe663da (patch)
treeb47913ac88ed2f542824775aef5a9f441edd9ef6 /source/blender/simulations/bparticles
parentb4b25eac9ad1a4c28ff996819b059a8c02e760f9 (diff)
speedup multi function evaluation
Diffstat (limited to 'source/blender/simulations/bparticles')
-rw-r--r--source/blender/simulations/bparticles/events.cpp2
-rw-r--r--source/blender/simulations/bparticles/particle_function.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/simulations/bparticles/events.cpp b/source/blender/simulations/bparticles/events.cpp
index 70d069e5a1a..1a4f366d8f2 100644
--- a/source/blender/simulations/bparticles/events.cpp
+++ b/source/blender/simulations/bparticles/events.cpp
@@ -67,7 +67,7 @@ void CustomEvent::filter(EventFilterInterface &interface)
ParticleFunctionEvaluator inputs{m_inputs_fn, interface.index_mask(), interface.attributes()};
inputs.context_builder().add_global_context(end_time_context);
inputs.context_builder().add_element_context(durations_context,
- IndexRange(interface.array_size()));
+ FN::MFElementContextIndices::FromDirectMapping());
inputs.compute();
for (uint pindex : interface.index_mask().indices()) {
diff --git a/source/blender/simulations/bparticles/particle_function.cpp b/source/blender/simulations/bparticles/particle_function.cpp
index eb1c6b6476c..331d3ef2bce 100644
--- a/source/blender/simulations/bparticles/particle_function.cpp
+++ b/source/blender/simulations/bparticles/particle_function.cpp
@@ -60,7 +60,8 @@ void ParticleFunctionEvaluator::compute()
uint array_size = m_mask.min_array_size();
FN::ParticleAttributesContext attributes_context = {m_particle_attributes};
- m_context_builder.add_element_context(attributes_context, IndexRange(array_size));
+ m_context_builder.add_element_context(attributes_context,
+ FN::MFElementContextIndices::FromDirectMapping());
m_context_builder.add_global_context(m_particle_fn.m_id_data_cache);
m_context_builder.add_global_context(m_particle_fn.m_id_handle_lookup);