[Bf-blender-cvs] [0a57597aff8] blender2.8: Temporary fix for crash related to VBO update on shader change
Luca Rood
noreply at git.blender.org
Tue Jul 11 13:06:10 CEST 2017
Commit: 0a57597aff8c513b1f75e91cfeca3fd04ab9d7b1
Author: Luca Rood
Date: Tue Jul 11 12:52:04 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB0a57597aff8c513b1f75e91cfeca3fd04ab9d7b1
Temporary fix for crash related to VBO update on shader change
This frees the whole mesh batch cache, instead of only the required
parts, as freeing specific parts of a cache is currently causing
crashes.
===================================================================
M source/blender/draw/intern/draw_cache_impl_mesh.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 66a946ef4a1..ae0e62809bb 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -1599,14 +1599,9 @@ void DRW_mesh_batch_cache_dirty(Mesh *me, int mode)
cache->is_really_dirty = true;
break;
case BKE_MESH_BATCH_DIRTY_SHADING:
- GWN_VERTBUF_DISCARD_SAFE(cache->shaded_triangles_data);
- if (cache->shaded_triangles) {
- for (int i = 0; i < cache->mat_len; ++i) {
- GWN_BATCH_DISCARD_SAFE(cache->shaded_triangles[i]);
- }
- }
-
- MEM_SAFE_FREE(cache->shaded_triangles);
+ /* TODO: This should only update UV and tangent data,
+ * and not free the entire cache. */
+ cache->is_really_dirty = true;
break;
default:
BLI_assert(0);
More information about the Bf-blender-cvs
mailing list