Refactoring: Geometry Node: Avoid copy last buffer in result for Blur Attribute node #106860

Merged
Jacques Lucke merged 7 commits from mod_moder/blender:blur_avoid_extra_copy into main 2023-04-17 08:09:15 +02:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 3c03958ade - Show all commits

View File

@ -252,6 +252,8 @@ static Span<T> blur_on_mesh_exec(const Span<float> neighbor_weights,
const MutableSpan<T> buffer_a,
const MutableSpan<T> buffer_b)
{
/* Source is set to buffer_b even though it is actually in buffer_a because the loop below starts
mod_moder marked this conversation as resolved Outdated

Add comment Source is set to buffer_b even though it is actually in buffer_a because the loop below starts with swapping both.

Add comment `Source is set to buffer_b even though it is actually in buffer_a because the loop below starts with swapping both.`
* with swapping both. */
MutableSpan<T> src = buffer_b;
MutableSpan<T> dst = buffer_a;