Fix: Data race writing to bitmap in PBVH draw

Mistake in d601bf7e3d.
A bit vector can't be written to in parallel.
This commit is contained in:
Hans Goudey
2024-09-14 12:26:47 -04:00
parent 5b03fee0d2
commit afa1a6bebf

View File

@@ -181,9 +181,8 @@ void DrawCacheImpl::AttributeData::tag_dirty(const IndexMask &node_mask)
if (this->dirty_nodes.size() < mask_size) {
this->dirty_nodes.resize(mask_size);
}
/* TODO: Somehow use IndexMask::from_bits with the `reset_all` at the beginning disabled. */
node_mask.foreach_index_optimized<int>(GrainSize(4096),
[&](const int i) { this->dirty_nodes[i].set(); });
/* TODO: Somehow use `IndexMask::to_bits` with the `reset_all` at the beginning disabled. */
node_mask.foreach_index_optimized<int>([&](const int i) { this->dirty_nodes[i].set(); });
}
void DrawCacheImpl::tag_all_attributes_dirty(const IndexMask &node_mask)