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:
authorAntony Riakiotakis <kalast@gmail.com>2014-01-05 06:58:27 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-01-05 06:58:27 +0400
commitd9697bc1455dc556fd233aae9d45b523af62669b (patch)
treebd3bdcf47862f45362c7aef105efa193c586966c /source/blender/blenkernel/intern/pbvh.c
parent0074eac1ed6a876a951f04b6a017fd7058041558 (diff)
Fix T38024 crash when rebuilding sculpt mode buffers.
Main issue here is that glBuf* calls were invoked from threads different than main thread. This caused a crash (since those do not have a GL context active). Fix here is twofold: * add an ID buffer in buffer pool that handles pbvh buffers and is freed from main thread when gpu_buffer_pool_free_unused is called. * do not create glbuffers in derivedmesh creation routine, rather tag nodes for update and create those in the draw function (guaranteed to be called from main thread) Reviewed By: brecht Differential Revision: https://developer.blender.org/D169
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 90447db5113..59bc9f9e57e 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -330,15 +330,7 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
}
}
- if (!G.background) {
- node->draw_buffers =
- GPU_build_pbvh_mesh_buffers(node->face_vert_indices,
- bvh->faces, bvh->verts,
- node->prim_indices,
- node->totprim);
- }
-
- node->flag |= PBVH_UpdateDrawBuffers;
+ BKE_pbvh_node_mark_rebuild_draw(node);
BLI_ghash_free(map, NULL, NULL);
}