Thread rendering stability commit.
I noticed still several cases where the Imbuf library was called within a thread... and that whilst the Imbuf itself isn't threadsafe. Also the thread lock I added in rendering for loading images actually didn't work, because then it was still possible both threads were accessing the MEM_malloc function at same time. This commit nearly fully replaces ImBuf calls in compositor (giving another nice speedup btw, the way preview images in Nodes were calculated used clumsy imbuf scaling code). I've also centralized the 'mutex' locking for threading, which now only resides in BLI_threads.h. This is used to secure the last ImBuf calls I cannot replace, which is loading images and creating mipmaps. Really hope we get something more stable now!
This commit is contained in:
@@ -38,7 +38,10 @@ int BLI_available_thread_index(ListBase *threadbase);
|
||||
void BLI_insert_thread (ListBase *threadbase, void *callerdata);
|
||||
void BLI_remove_thread (ListBase *threadbase, void *callerdata);
|
||||
void BLI_end_threads (ListBase *threadbase);
|
||||
|
||||
|
||||
void BLI_lock_thread (void);
|
||||
void BLI_unlock_thread (void);
|
||||
|
||||
/* threadsafe version of MEM_malloc and friends */
|
||||
void *MEM_mallocT(int len, char *name);
|
||||
void *MEM_callocT(int len, char *name);
|
||||
|
||||
Reference in New Issue
Block a user