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
AgeCommit message (Collapse)Author
2017-05-31Merge branch 'master' into blender2.8Sergey Sharybin
2017-05-31Task scheduler: Optimize subsequent pushing bunch of tasksSergey Sharybin
The idea is to accumulate all new tasks in a thread local queue first without doing any thread synchronization (aka, locks and conditional variables) and move those tasks to a scheduler queue once they are all ready. This way we avoid per-task-pool lock and only have one lock per bunch of tasks. This is particularly handy when scheduling new dependency graph node children. Brings FPS of cached simulation from the linked below file from ~30 to ~50. See documentation for BLI_task_pool_delayed_push_{begin, end} and for TaskThreadLocalStorage::do_delayed_push. Fixes T50027: Rigidbody playback and simulation performance regression with new depsgraph Thanks Bastien for the review!
2017-04-06Depsgraph: Remove olde depsgraph header from new depsgraphSergey Sharybin
2017-04-05Depsgraph: Remove all layer bit flags related checksSergey Sharybin
These bits became obsolete with the new layer system, so we can simplify some code around them or avoid existing workarounds which were trying to keep things working for them. There are still work needed to be done for on_visible_change to avoid unnecessary updates, but that can also happen later.
2017-03-07Task scheduler: Add concept of suspended poolsSergey Sharybin
Suspended pools allows to push huge amount of initial tasks without any threading synchronization and hence overhead. This gives ~50% speedup of cached rigid body with file from T50027 and seems to have no negative affect in other scenes here.
2017-03-07Depsgraph: Remove workarounds from depsgraph for keeping threads aliveSergey Sharybin
This is something what should be done in the task scheduler instead with local thread queues so we handle this in a single place.
2017-03-07Task scheduler: Remove per-pool threads limitSergey Sharybin
This feature was adding extra complexity to task scheduling which required yet extra variables to be worried about to be modified in atomic manner, which resulted in following issues: - More complex code to maintain, which increases risks of something going wrong when we modify the code. - Extra barriers and/or locks during task scheduling, which causes extra threading overhead. - Unable to use some other implementation (such as TBB) even for the comparison tests. Notes about other changes. There are two places where we really had to use that limit. One of them is the single threaded dependency graph. This will now construct a single-threaded scheduler at evaluation time. This shouldn't be a problem because it only happens when using debugging command line arguments and the code simply don't run in regular Blender operation. The code seems a bit duplicated here across old and new depsgraph, but think it's OK since the old depsgraph is already gone in 2.8 branch and i don't see where else we might want to use such a single-threaded scheduler. When/if we'll want to do so, we can move it to a centralized single-threaded scheduler in threads.c. OpenGL render was a bit more tricky to port, but basically we are using conditional variables to wait background thread to do all the job.
2017-02-03Depsgraph: Add some extra debug prints on evalSergey Sharybin
2016-12-05Depsgraph: Use HIGH priority for scheduled tasksSergey Sharybin
This kind of keeps threads "warmer" and should in theory give better cache coherency bringing some %% of speedup. It was already tested few months ago and it gave few % speedup in barber shop, but was reverted due to some bone popping. The popping is now fixed so it should be fine to use new scheduling policy.
2016-11-15Atomics: Make naming more obvious about which value is being returnedSergey Sharybin
2016-09-06Revert "Depsgraph: Prioritize evaluation of the new scheduled nodes"Sergey Sharybin
This reverts commit 9444cd56db1a4e43d03fa8c735cd893b2e74b913. This commit caused some flickering in the bones when swapping IK to Fk. While it's unclear why such change caused any regressions, let's revert it to unlock the studio.
2016-08-25Depsgraph: Prioritize evaluation of the new scheduled nodesSergey Sharybin
The idea here is again to finish objects evaluation as soon as possible. Seems to be giving another 3% speedup in the barber scenes.
2016-07-26Depsgraph: Use proper unsigned int bitfield for layers flagsSergey Sharybin
2016-06-18Cleanup: style, whitespace, doxy filepathsCampbell Barton
2016-05-27Depsgraph: Cleanup and code simplificationSergey Sharybin
This is mainly a maintenance commit which was aimed to make work with this module more pleasant and solve such issues as: - Annoyance with looong files, which had craftload in them - Usage of STL for the data structures we've got in BLI - Possible symbol conflicts - Not real clear layout of what is located where So in this commit the following changes are done: - STL is prohibited, it's not really predictable on various compilers, with our BLI algorithms we can predict things much better. There are still few usages of std::vector, but that we'll be solving later once we've got similar thing in BLI. - Simplify foreach loops, avoid using const_iterator all over the place. - New directory layout, which is hopefully easier to follow. - Some files were split, some of them will be split soon. The idea of this is to split huge functions into own files with good documentation and everything. - Removed stuff which was planned for use in the future but was never finished, tested or anything. Let's wipe it out for now, and bring back once we really start using it, so it'll be more clear if it solves our needs. - All the internal routines were moved to DEG namespace to separate them better from rest of blender. Some places now annoyingly using DEG::foo, but that we can olve by moving some utility functions inside of the namespace. While working on this we've found some hotspot in updates flush, so now playback of blenrig is few percent faster (something like 96fps with previous master and around 99-100fps after this change). Not saying it's something final, there is still room for cleanup and API simplification, but those might happen as a regular development now without doing any global changes.