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
2022-11-09Depsgraph: simplify scheduling in depsgraph evaluatorJacques Lucke
No functional or performance changes are expected. Differential Revision: https://developer.blender.org/D16423
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
2022-08-10Depsgraph: Optimize evaluation of dependencies of disabled modifiersSergey Sharybin
Solves long-standing issue when dependencies of disabled modifiers are evaluated. Simple test case: no drivers or animation. Manually enabling modifier is expected to bring FPS up, enabling modifier will bring FPS (sine evaluation can not be avoided) F13336690 More complex test case: modifier visibility is driven by an animated property. In am ideal world FPS during property being zero is fast and when property is 1 the FPS is low. F13336691. Differential Revision: https://developer.blender.org/D15625
2022-07-27Fix T99976: Animated visibility not rendering properly in viewportSergey Sharybin
A mistake in the 0dcee6a3866 which made specific driven visibility to work, but did not properly handle actual time-based visibility. The basic idea of the change is to preserve recalculation flags of nodes which were tagged for update but were not evaluated due to visibility constraints. In the file from the report this makes it so tagging which is done first time ID is in the dependency graph are handled when the ID actually becomes visible. This is what solved the root of the problem from the report: there was missing geometry update since it was "swallowed" by the evaluation during the object being invisible. In other configurations this change allows to handle pending geometry updates due to animated modifiers be handled when object becomes visible without time change. This change also solves visibility issue of the synchronization component which also started to be handled badly since the previous fix attempt. Basically, the needed exception in its visibility handling did not happen and a regular logic was used for it. Tested with files from the T99733, T99976, and from the Heist project. Differential Revision: https://developer.blender.org/D15544
2022-07-26Cleanup: spelling in commentsCampbell Barton
2022-07-21Fix T99733: Objects with driven visibility are evaluated when not neededSergey Sharybin
The issue was caused by the fact that objects with driven or animated visibility were considered visible by the dependency graph evaluation. This change makes it so the dependency graph evaluation is aware of visibility which might be changing. This is achieved by evaluating the path of the graph which affects objects visibility and adjusts to it before evaluating the rest of the graph. There is some time penalty to this, but there does not seem to be a way to fully avoid this penalty. With the production shot from the heist project the FPS drops by a tenth of a frame (~9.4 vs ~9.3 fps) when adding a driver to an object which keeps it visible. Note that this is a bit hard to measure since the FPS fluctuates quite a bit throughout the playback. On the other hand, having a driver on a visibility of a heavy object from character and setting visibility to false gives big speedup. Also worth noting that there is no penalty at all when there are no animated visibilities in the scene. Differential Revision: https://developer.blender.org/D15498
2022-07-21Depsgraph: Clear operation evaluation flags early onSergey Sharybin
The goal is to make it possible to evaluate the graph in multiple passes without evaluating the same node multiple times. Currently should not be any functional changes.
2022-07-19Depsgraph: Cleanup, don't mic static function and anonymous namespaceSergey Sharybin
2022-07-19Depsgraph: Refactor evaluation into smaller reusable functionsSergey Sharybin
Should be no functional changes.
2022-07-19Depsgraph: Use single task pool during evaluationSergey Sharybin
Not sure why multiple pools were created: the pool should be able to handle two sets of tasks. Perhaps non-measurable improvement in terms of performance but this change simplifies code a bit.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-10Cleanup: move public doc-strings into headers for 'depsgraph'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
2021-11-02Fix T89487: Crash adding Rigid Body to object with shared mesh dataSergey Sharybin
Not sure why this bug was only discovered by such an elaborate steps and why it took so long to be discovered. The root of the issue is that in the 956c539e597a the typical flow of tag+flush+evaluate was violated and tagging for visibility change happened after flush.
2021-09-10Depsgraph: release GIL when evaluating the depsgraphSybren A. Stüvel
Evaluating the dependency graph potentially executes Python code when evaluating drivers. In specific situations (see T91046) this could deadlock Blender entirely. Temporarily releasing the GIL when evaluating the depsgraph resolves this. This is an improved version of rBfc460351170478e712740ae1917a2e24803eba3b, thanks @brecht for the diff! Manifest task: T91046
2021-09-09Revert "Depsgraph: release GIL when evaluating the depsgraph"Brecht Van Lommel
It is causing crashes in rendering, when releasing the GIL in render threads while the main thread is holding it. Ref T91046 This reverts commit fc460351170478e712740ae1917a2e24803eba3b.
2021-09-09Depsgraph: release GIL when evaluating the depsgraphSybren A. Stüvel
Evaluating the dependency graph potentially executes Python code when evaluating drivers. In specific situations (see T91046) this could deadlock Blender entirely. Temporarily releasing the GIL when evaluating the depsgraph resolves this. Calling the `BPy_BEGIN_ALLOW_THREADS` macro is relatively safe, as it's a no-op when the current thread does not have the GIL. Developed in collaboration with @sergey Manifest task: T91046
2021-07-21Cleanup: replace BLI_assert(0 && "text") with BLI_assert_msgCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-06-22Fix T89196: Depsgraph use-after-free after scene switching undoSergey Sharybin
Delay depsgraph visibility update tagging until it is known that graph relations are up to date, and until it is known that the graph is actually needed to be evaluated. Differential Revision: https://developer.blender.org/D11660
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-06-08BLI: support disabling task isolation in task poolJacques Lucke
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
2020-11-07Cleanup: Clang-tidy, modernize-concat-nested-namespacesAnkit Meel
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-09-09Cleanup: spellingCampbell Barton
2020-08-19Cleanup: spellingCampbell Barton
2020-08-07Cleanup: Depsgraph, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/depsgraph` module. No functional changes.
2020-06-29Depsgraph: introduce blender::deg namespaceJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8150
2020-04-30Task: Use TBB as Task SchedulerBrecht Van Lommel
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor. Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance. * Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend. * AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D7475
2020-04-28Cleanup: remove unnecessary includesJacques Lucke
2020-04-28Depsgraph: use BLI::Set for entry_tagsJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D7555
2020-04-21CleanUp: Renamed `BLI_task_pool_userdata` to `BLI_task_pool_user_data`Jeroen Bakker
In preparation for {D7475}
2020-04-09TaskScheduler: Minor Preparations for TBBBrecht Van Lommel
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Depsgraph: Fix crash deleting Viewer image from OutlinerSergey Sharybin
Was happening when having compositor open with Viewer node attached directly to Render Layers output. There were two things involved here: 1. The code which was storing CoW-ed versions of IDs was checking all IDs for whether they are expanded or not. This was causing access of freed memory for deleted IDs which do not need CoW (such as IM). Simple fix: store ID type as a scalar and use early check before doing more elaborate check based on accessing fields of id_cow. 2. The code which was ensuring view layer pointer is doing CoW for scene. This isn't an issue on its own, but scene might have an embedded ID such as compositor which was actually traversed by the ID remap routines. This was causing remapping procedure to go into non-updated copy of compositor, accessing freed Viewer image ID. Solved by not recursing into embedded IDs for datablocks as those are supposed to have own copy-on-write operations which takes care of re-mapping. Reported my Bastien, and also pair-coded with him.
2020-01-25Cleanup: spellingCampbell Barton
2020-01-24Depsgraph: Report FPS when running with --debug-depsgraph-timeSergey Sharybin
The FPS here is measured based on a timestamp from when depsgraph was previously evaluated. Allows to ease investigating performance improvements/regressions which are not related on animation system but on modifications on a single frame (such as transforming vertex in edit mode).
2020-01-24Depsgrapg: Refactor, move Relation to own fileSergey Sharybin
2020-01-08Fix T62311: Metaball animation playback crashSergey Sharybin
This commit restores old metaball workaround which was forcing their update from a single thread. The root of the issue comes to the fact that metaball evaluation needs to access metaballs from duplilists, so they are properly polygonized with corresponding motherball which is outside of duplilist. In a more ideal world this will be implemented in a way that will not require iterating over all duplilists, but only through the ones which actually contain metaballs for the given motherball. In practice this ends up in a huge refactor in both relations builder (which meeds to see whether there are metaballs in duplilists without actually creating duplilist as it can not be done prior scene is evaluated) and in metaballs area which need to use new relations information. Additionally, metaball evaluation must become thread-safe, which is currently not a case with dupli-object matrices. There might be issues deeper in polygonization code which I am not aware of. Having this forced single-thread evaluation is same as Blender 2.79 was doing. Think it's better to have slower but simpler solution than to invest time in refactoring area which requires deeper design changes. Reviewed By: dfelinto Differential Revision: https://developer.blender.org/D6539
2020-01-07Depsgraph: Revert unwillingly staged change from previous commitSergey Sharybin
One of those days, sorry for the spam.
2020-01-07Depsgraph: Cleanup spellingSergey Sharybin
For some reason got sneaked into previous commit.
2020-01-07Depsgraph: Refactor, make evaluation stages easier to extendSergey Sharybin
Currently should be no functional changes, but allows to extend it for experiments or for real fixes.
2020-01-07Depsgraph: Cleanup, move private functions to anonymous namespaceSergey Sharybin
Allows to have shorter definition lines.
2019-10-11Depsgraph: Cleanup, promote is_evaluating querySergey Sharybin
This way it might be used for sanity checks in RNA API as well.
2019-10-11Depsgraph: Don't use push-from-thread when scheduling graphSergey Sharybin
This isn't guaranteed that graph is scheduled from main thread, so it is actually a miracle how it all worked.
2019-10-08Depsgraph: Avoid threading for trivial operationsSergey Sharybin
Found this while looking into T70463, solves the high spinning times mentioned in T70463#791026. Sounds logical that iterating over an array to modify a single property is faster than doing it in threads. But strangely, doing it for both nodes and its components is still faster in threads here. Gives extra speedup with a file mentioned in the report. Reviewed By: brecht, mont29 Differential Revision: https://developer.blender.org/D6017
2019-10-08Depsgraph: Cleanup, spelling in commentSergey Sharybin
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-18Cleanup: C++ style of structure definitionSergey Sharybin