Commit Graph

55451 Commits

Author SHA1 Message Date
Sergey Sharybin
5fe87a0a8c Task scheduler: Use single thread branch when range fits into single chunk 2018-01-09 18:10:47 +01:00
Sergey Sharybin
4a3b303bb0 Task scheduler: Fix wrong tasks calculation when chunk size is too big 2018-01-09 18:07:34 +01:00
Sergey Sharybin
932d448ae0 Task scheduler: Use const qualifiers in parallel range 2018-01-09 16:09:33 +01:00
Sergey Sharybin
8cffb0a141 Task scheduler: Avoid over-allocation of tasks for parallel ranges
This seems to only cause extra rthreading overhead on systems with 10s of
threads, without actually solving anything.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
c4e42d70a4 Task scheduler: Add minimum number of iterations per thread in parallel range
The idea is to support following: allow doing parallel for on a small range,
each iteration of which takes lots of compute power, but limit such range to
a subset of threads.

For example, on a machine with 44 threads we can occupy 4 threads to handle
range of 64 elements, 16 elements per thread, where each block of 16 elements
is very complex to compute.

The idea should be to use this setting instead of global use_threading flag,
which is only based on size of array. Proper use of the new flag will improve
threadability.

This commit only contains internal task scheduler changes, this setting is not
used yet by any areas.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
3144f0573a Task scheduler: Simplify parallel range function
Basically, split it up and avoid extra abstraction level.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
4c4a7e84c6 Task scheduler: Use single parallel range function with more flexible function
Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
d2708b0f73 Task scheduler: Get rid of extended version of parallel range callback
Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.
2018-01-09 16:09:33 +01:00
Sergey Sharybin
f5d64b59f5 Fix T53691: Motion Tracking Object Solver Constraint doesn't work as Bone Constraint 2018-01-09 14:27:19 +01:00
Sergey Sharybin
bf8137994d Depsgraph: Move special handling of tracking constraints to a dedicated function 2018-01-09 14:11:23 +01:00
Sergey Sharybin
d32878b425 Depsgraph: Perform early check on constraint info NULL 2018-01-09 13:09:59 +01:00
Campbell Barton
ce0fcf1378 Correct error in last commit (versioning) 2018-01-09 15:17:00 +11:00
Campbell Barton
6554207841 Add deform axis for Simple Deform modifier
D2989 by @dmarra w/ own edits
2018-01-09 15:09:55 +11:00
Sebastian Koenig
c8a989d644 No groping in Blender's Tracker!
This a small cleanup of something which I think is just a typo anyway.

With all the recent talks of harrassment and groping, I think we better avoid
that within our source code! :)

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

Differential Revision: https://developer.blender.org/D2979
2018-01-08 14:12:15 +01:00
Sergey Sharybin
3ee2ed3049 Fix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled marker
Simple fix, which is totally safe for 2.79a!
2018-01-08 14:10:50 +01:00
Bastien Montagne
96e507d989 Fix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.
Stupid mistake in material reading code, thanks to Simon Wendsche (@BYOB) for the investigation and fix!

To be backported to 2.79a.
2018-01-08 09:37:56 +01:00
Campbell Barton
a7b4f98e73 Fix T53713: User remap failed w/ texface images 2018-01-08 16:58:58 +11:00
Ines Almeida
87607254d6 (Nodes) Display image name if any in the Image and Texture Image node title 2018-01-07 22:29:25 +01:00
Aaron Carlisle
add580beee Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Differential Revision: https://developer.blender.org/D2981
2018-01-06 16:41:39 +01:00
Brecht Van Lommel
0e59f2b256 Fix T47212: incorrect luma coefficients for Luminance Key node.
Differential Revision: https://developer.blender.org/D2982
2018-01-06 16:41:33 +01:00
Philipp Oeser
c6abf41f71 Fix T53650: remove hard limits on force field size and max distance.
Differential Revision: https://developer.blender.org/D2987
2018-01-06 16:15:13 +01:00
Campbell Barton
6eb89027c3 Fix T53696: Compositor HSV limits changed 2018-01-05 20:13:17 +11:00
Dalai Felinto
95d83b9b23 Fix leak when rendering OpenGL animations
We were duplicating rectf twice :/

Patch by Clément Foucault.
2018-01-04 15:56:43 -02:00
Campbell Barton
0becc8a7dd Fix T52953: Crash removing material 2018-01-04 21:35:09 +11:00
Campbell Barton
457dc8d12c Fix T53586: Surfaces collapse when joined 2018-01-04 16:01:27 +11:00
Campbell Barton
9b65560934 Fix T53637: Keymap from app-template ignored
Addon's were also ignored
2018-01-04 14:19:00 +11:00
Dalai Felinto
ffb2c40176 New API function to call an existing menu
Thanks Campbell Barton for the help and review.
This is for Blender 2.8, so we are not using this function yet.
2018-01-03 10:17:59 -02:00
Campbell Barton
e981a7de31 Missing from last commit 2018-01-03 22:01:40 +11:00
Campbell Barton
2f8c2572ed Fix T53632: Objects outside scene shown in popup
Only show objects in current scene when not pinned.

This commit adds a filter argument to id-template
since we may want to filter by other criteria.
2018-01-03 21:54:02 +11:00
Gaia Clary
e59cf13b8c fix T53230: avoid Nullpointer problems in Collada Exporter 2018-01-01 15:02:26 +01:00
Philipp Oeser
08b063a19f Fix T53639: text sequence strips no stamped into render.
Differential Revision: https://developer.blender.org/D2977
2017-12-29 00:25:29 +01:00
Bastien Montagne
17f1ce4d4f Fix T53630: Effect strips not displaying Input data.
Fix T52977: Parent bone name disappeared in the UI in pose mode.

Regression caused by own rBc57636f060018. So instead of changing widget
type, just flag it as disabled.

Note that core of the issue is elsewhere though - there is absolutely no
reasons to have a search widget for pointers we cannot change nor
search! But fixing this is not really top priority, one of the many
glitches of our UI code, so think we can live with current code.

To be backported to 2.79a.
2017-12-28 17:57:18 +01:00
Joshua Leung
7e4568a939 Cleanup - Various style/typo fixes 2017-12-23 23:54:05 +13:00
Bastien Montagne
d130c66db4 Fix scalability issue in threaded code of Mesh normals computation.
We tried to do as much as possible in a single threaded callback, which
lead to using some nasty tricks like fake atomic-based spinlocks to
perform some operations (like float addition, which has no atomic
intrinsics).

While OK with 'standard' low number of working threads (8-16), because
collision were rather rare and implied memory barrier not *that* much
overhead, this performed poorly with more powerful systems reaching the
100 of threads and beyond (like workstations or render farm hardware).

There, both memory barrier overhead and more frequent collisions would
have significant impact on performances.

This was addressed by splitting further the process, we now have three
loops, one over polys, loops and vertices, and we added an intermediate
storage for weighted loop normals. This allows to avoid completely any
atomic operation in body of threaded loops, which should fix scalability
issues. This costs us slightly higher temp memory usage (something like
50Mb per million of polygons on average), but looks like acceptable
tradeoff.

Further more, tests showed that we could gain an additional ~7% of speed
in computing normals of heavy meshes, by also parallelizing the last two
loops (might be 1 or 2% on overall mesh update at best...).

Note that further tweaking in this code should be possible once Sergey
adds the 'minimum batch size' option to threaded foreach API, since very
light loops like the one on loops (mere v3 addition) require much bigger
batches than heavier code (like the one on polys) to keep optimal
performances.
2017-12-22 22:12:23 +01:00
Sergey Sharybin
6efd58dd3e Task scheduler: Clarify why do we need an atomic add of 0 2017-12-22 16:37:25 +01:00
Sergey Sharybin
870840e8b7 Subsurf: Avoid possible use of partially initialized edge hash 2017-12-22 12:51:00 +01:00
Sergey Sharybin
df0ecd73af Subsurf: Avoid global lock for loops and orig index layers
This is a bit annoying to have per-DM locking, but it's way better (as in, up to
4 times better) for playback speed when having lots of subsurf objects,
2017-12-22 12:50:57 +01:00
Sergey Sharybin
50f1c9a8af Task scheduler: Start with suspended pool to avoid threading overhead on push
The idea is to avoid any threading overhead when we start pushing tasks in a
loop. Similarly to how we do it from the new dependency graph. Gives couple of
percent of speedup here, but also improves scalability.
2017-12-22 12:25:11 +01:00
Sergey Sharybin
c66983c5c8 Depsgraph: Sort and clam number of statistics entries
Makes log easier to read.
2017-12-21 17:16:18 +01:00
Sergey Sharybin
885bb5b137 Depsgraph: Bring timing statistics to the new dependency graph
This statistics is only collected when debug_value is different from 0.

Stored in depsgraph node itself, so we can always have access to average data
and other stats which requires persistent storage. This way we also don't waste
time trying to find stats from a separately stored hash map.
2017-12-21 16:33:22 +01:00
Sergey Sharybin
d988eae6f9 Depsgraph: Make it more clear that we dump relations into graphviz
We might implement other things to dump into graphviz, so better to
start having explicit names.
2017-12-21 16:33:22 +01:00
Sergey Sharybin
b7121639e9 Depsgraph: Simplify some functions in evaluaiton 2017-12-21 16:33:22 +01:00
Sergey Sharybin
f0a5dc63ff Depsgraph: Simplify evaluation function 2017-12-21 16:33:22 +01:00
Sergey Sharybin
41b29c69c0 Depsgraph: Fix mistake in previous commit 2017-12-21 12:16:12 +01:00
Sergey Sharybin
6e47680077 Depsgraph: Remove confusing declaration of node method
it is only to be implemented for operation node.
2017-12-21 11:58:48 +01:00
Sergey Sharybin
681a102800 Depsgraph: Remove one of temporary tags in the node
No real reason to have that, better to free up space for something much more
awesome!
2017-12-21 11:47:34 +01:00
Sergey Sharybin
5df4950073 Depsgraph: Cleanup, move implementation away from header 2017-12-21 11:35:10 +01:00
Sergey Sharybin
f6b2fbb029 Depsgraph: Remove evaluation priority completely 2017-12-21 11:15:21 +01:00
Sergey Sharybin
f906f5cc58 Depsgraph: Remove eval priority from debugger
This needs to be redone anyway, to correspond to possibly new priorities
calculated for evaluaiton.
2017-12-21 11:14:39 +01:00
Sergey Sharybin
0ed3a72012 Depsgraph: Remove unused component context functions 2017-12-21 10:37:00 +01:00