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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-11-04 19:30:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-04 19:30:25 +0300
commita5f4f1e2cea831415c045be4927320dc060798c9 (patch)
tree6ba079a4cadf5bdb10d6815326b42ebbd83259d0 /source/blender/blenkernel/intern/CCGSubSurf.c
parent4ff6e08a6df9dedfe26df539c1147481da07a9de (diff)
OpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from non-main thread
This is really similar to what GPU module was already doing. There are number of possible improvements still: - Re-use allocated VAOs when requesting new ones instead of going to the trouble of freeing VAO and then re-creating it again. - Move VAO handling to GPU module. Fixes T46589: OpenSubdiv crash with drivers
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf.c')
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 95ddb9d5498..828a6bb16ac 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -334,11 +334,10 @@ void ccgSubSurf_free(CCGSubSurf *ss)
openSubdiv_deleteEvaluatorDescr(ss->osd_evaluator);
}
if (ss->osd_mesh != NULL) {
- /* TODO(sergey): Make sure free happens form the main thread! */
- openSubdiv_deleteOsdGLMesh(ss->osd_mesh);
+ ccgSubSurf__delete_osdGLMesh(ss->osd_mesh);
}
if (ss->osd_vao != 0) {
- glDeleteVertexArrays(1, &ss->osd_vao);
+ ccgSubSurf__delete_vertex_array(ss->osd_vao);
}
if (ss->osd_coarse_coords != NULL) {
MEM_freeN(ss->osd_coarse_coords);