diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-19 14:06:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-19 14:06:05 +0400 |
commit | b9ae749480aeeb7e77f16ebe667ddfcf8b63650e (patch) | |
tree | 88a43f1b3605e5e9ad03fd626bcc874bc32e05ac /source/blender/blenkernel/intern/lattice.c | |
parent | 59dfb05c72a6cbbeed6e545488e3e4fe9f25d061 (diff) |
Make GPU buffers allocation/freeing safe for threading
Code in GPU_buffers_free was already trying to be safe
for threading, by skipping OGL calls there, but in fact
it was still buggy.
Namely, freeing was doing buffers shift in a cycle, and
if two threads will call this function shifting will go
crazy.
Now made it so GPU_buffers_alloc and GPU_buffers_free
are using mutex lock, so they're completely safe for
threading. Same goes to gpu_buffer_setup function.
It required minor functions reshuffle, so there're no
locks happening from locked thread, but it's all very
straightforward change
--
svn merge -r58276:58277 ^/branches/soc-2013-depsgraph_mt
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
0 files changed, 0 insertions, 0 deletions