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:
authorJoseph Eagar <joeedh@gmail.com>2022-04-27 23:03:49 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-04-27 23:05:06 +0300
commitbfb4dcaa1a7ec5bfd2b25cf7aa5b6173d6c53358 (patch)
tree351733360f03cc1505a409e14873161c582afb83 /source/blender/draw
parentf3d5114c41352161d0dad7f30ef6b7dd1f28df85 (diff)
Fix T97235: PBVH draw cache invalidation bug
The PBVH draw cache wasn't being invalidated in all cases. It is now invalidated whenever a PBVH node's draw buffers are freed.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index e4aec17eb69..917216b92e6 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -883,6 +883,11 @@ static bool mesh_batch_cache_valid(Object *object, Mesh *me)
if (cache->pbvh_is_drawing != BKE_pbvh_is_drawing(object->sculpt->pbvh)) {
return false;
}
+
+ if (BKE_pbvh_is_drawing(object->sculpt->pbvh) &&
+ BKE_pbvh_draw_cache_invalid(object->sculpt->pbvh)) {
+ return false;
+ }
}
if (cache->is_editmode != (me->edit_mesh != NULL)) {