diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-04 19:30:25 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-04 19:30:25 +0300 |
commit | a5f4f1e2cea831415c045be4927320dc060798c9 (patch) | |
tree | 6ba079a4cadf5bdb10d6815326b42ebbd83259d0 /source/blender/blenkernel/intern/CCGSubSurf_intern.h | |
parent | 4ff6e08a6df9dedfe26df539c1147481da07a9de (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_intern.h')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_intern.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_intern.h b/source/blender/blenkernel/intern/CCGSubSurf_intern.h index e2b42065382..e0771020350 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_intern.h +++ b/source/blender/blenkernel/intern/CCGSubSurf_intern.h @@ -303,6 +303,14 @@ void ccgSubSurf__sync_legacy(CCGSubSurf *ss); void ccgSubSurf__sync_opensubdiv(CCGSubSurf *ss); +/* Delayed free routines. Will do actual free if called from + * main thread and schedule free for later free otherwise. + */ + +void ccgSubSurf__delete_osdGLMesh(struct OpenSubdiv_GLMesh *osd_mesh); +void ccgSubSurf__delete_vertex_array(unsigned int vao); +void ccgSubSurf__delete_pending(void); + /* * CCGSubSurf_opensubdiv_converter.c * */ struct OpenSubdiv_Converter; |