Commit Graph

75472 Commits

Author SHA1 Message Date
Clément Foucault
0142264508 Eevee: Lamps: Optimize lamps CPU/Memory usage.
Tests on my system with ~1200 objects with 128 shadow casting lamps (current max) show a significant perf improvment (cache timing : 22ms -> 9ms)
With a baseline with no shadow casting light at 6ms this give a reduction of the overhead from 16ms to 3ms.

This remove pretty much all allocations during the cache phase. Leading to a big improvement for scene with a large number of lights & shadowcasters.
The lamps storage has been replace by a union to remove the need to free/allocate everyframe (also reducing memory fragmentation).

We replaced the linked list system used to track shadow casters by a huge bitflag.
We gather the lights shadows bounds as well as the shadow casters AABB during the cache populate phase and put them in big arrays cache friendly.

Then in the cache finish phase, it's easier to iterate over the lamps shadow SphereBounds and test for intersection.

We use a double buffer system for the shadow casters arrays to detect deleted shadow casters.
Unfortunatly, it seems that deleting an object trigger an update for all other objects (thus tagging most shadow casting lamps to update), defeating the purpose of this tracking.
This needs further investigation.
2018-01-11 16:50:54 +01:00
Dalai Felinto
a08f687b91 Fix poll and name of collection link/unlink operators
Reported via IRC by Pablo Vazquez (venomgfx).
2018-01-11 12:45:00 -02:00
Sergey Sharybin
656b9a46b3 Merge branch 'master' into blender2.8 2018-01-11 15:14:30 +01:00
Sergey Sharybin
38d480fb54 Subsurf: Allow partial threading over geometry arrays
This helps avoiding threading overhead when having lots of system threads..
2018-01-11 15:06:56 +01:00
Sergey Sharybin
374c4f168d Mesh evaluate: Tweak threadability criteria
Gives measurable speedup on layout scenes from Spring.

Actual value for chunk size is a subject for more scientific research.
2018-01-11 15:04:13 +01:00
Sergey Sharybin
cdcdae663a Mesh deform: Tweak threadability criteria
Allow threading using subset of all available threads. Makes it faster to
evaluate lower resolution mesh but with complex deform groups and such.
2018-01-11 14:51:30 +01:00
Sergey Sharybin
c276fef413 Subsurf: Make copyFinalLoopArray() threaded
Gives about 40% speedup of object which has simple-ish deformation applied
on top of subdivided mesh.

This might easily happen with single character animation.
2018-01-11 14:49:32 +01:00
Sergey Sharybin
1255f572c7 Depsgraph: Make eval initialization more friendly for threading
Helps in cases of not very complex scenes and lots of system threads available.

A bit hard to measure change on it's own, it works best with the upcoming
changes and gives measurable improvements.
2018-01-11 14:48:49 +01:00
Sergey Sharybin
498ffef7b0 Subsurf: Use regular mutex instead of RW one
Mutex is now local to particular CCGDM, and guarding edge hash which is only
used by a single function only. There is no need to acquire read lock after
edge hash was created.
2018-01-11 14:38:58 +01:00
Bastien Montagne
c36f4a7f7f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/blender.c
	source/blender/makesdna/DNA_ID.h
2018-01-11 14:35:36 +01:00
Bastien Montagne
b415ed55a7 Fix critical issue with our DNA ID tags (two totally different tags having same value).
Nice typo from rBc4046e9082f6, tssk. ;)
2018-01-11 14:26:44 +01:00
Bastien Montagne
cc63c8511c Fix static override (very stupid mistakes in code!) 2018-01-11 12:29:09 +01:00
Bastien Montagne
de91f2389d Further fixes to new RNA props diff code.
Unfortunately, we cannot perform set/unset checks on 'resolved'
properties (i.e. from actual IDProperties pointers, and not virtual RNA
placeholders)... IDProps in RNA are rather challenging topic. :|

This should fully fix T53715: 2.8: Removing keymap items no longer works
2018-01-11 09:41:44 +01:00
Campbell Barton
0edda8e4ce Fix T53311: transform edge/normal orientation
When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.
2018-01-11 19:25:27 +11:00
Campbell Barton
717090f40e UI: option not to show screen splitting widgets
Request for simplified Blender template,
this may be extended to limit access to other UI changes
that could be pressed by accident.
2018-01-11 16:10:46 +11:00
Campbell Barton
9c91c75ea6 Merge branch 'master' into blender2.8 2018-01-11 13:24:41 +11:00
Campbell Barton
9d62e6e782 UI: don't draw outline when it's not calculated
Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.
2018-01-11 13:23:55 +11:00
Campbell Barton
ac2ebf9c54 Fix T53455: Object disappear w/ TrackTo constraint
Regression caused by own commit 16fbb47c88,
this is really an edge case though since calling normalize twice fixes.
2018-01-11 10:57:30 +11:00
Philipp Oeser
d0cc5d8948 Fix T53752: Draw curve fails w/ stylus 2018-01-11 10:23:52 +11:00
Campbell Barton
6112cde3f9 Merge branch 'master' into blender2.8 2018-01-11 10:19:00 +11:00
Campbell Barton
f330005266 Cleanup: BKE naming conventions for datablock add/localize
Conventions were already followed nearly everywhere.
2018-01-11 10:01:01 +11:00
Julian Eisel
3f16810150 Cleanup: Naming, avoid passing bContext to low-level function, etc 2018-01-10 23:02:10 +01:00
Julian Eisel
748e95ad50 Fix crash when deleting collections
With factory settings, steps to reproduce were:
* Select "Collection 1" (in "RenderLayer")
* Delete
It might crash at this point, although maybe this crash is ASAN only.

However, this was also doing some weird things that I've corrected now. It
called outliner_build_tree in an operator callback. This should only be
called in the main redraw function or so, not in regular handlers.
Instead, we manually cleanup the tree to keep it valid.
2018-01-10 22:45:44 +01:00
Sergey Sharybin
76bdd40bfd Subsurf: Loop array should not be called mv
mv is a mesh vertex, not loop.
2018-01-10 14:58:49 +01:00
Sergey Sharybin
fca202566f Subsurf: Remove increment of unused variable 2018-01-10 14:58:09 +01:00
Sergey Sharybin
181124ad13 Fix compilation error
Seems of new padding were added in 2.8 branch.
2018-01-10 14:15:13 +01:00
Sergey Sharybin
5d38c14116 Merge branch 'master' into blender2.8 2018-01-10 13:22:03 +01:00
Sergey Sharybin
2737837b09 Fix wrong data type used for undo memory limit 2018-01-10 13:20:36 +01:00
Sergey Sharybin
f21f18b572 Task scheduler: Use const qualifier in callbacks for parallel range 2018-01-10 12:53:59 +01:00
Sergey Sharybin
5614193745 Task scheduler: Use restrict pointer qualifier
Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.
2018-01-10 12:49:51 +01:00
Sergey Sharybin
518c65460e Task scheduler: Use more const qualifiers 2018-01-10 12:27:43 +01:00
Sergey Sharybin
f68b2fd233 RNA: Increase memory limit settings to their possible max on platform
This is quite common to have 64GB memory now, and even 128. There is no reason
to add any artificial caps on the cache and undo memory here. We can not protect
against using too much memory in one cases and allow use of full computer
potential in others.

Now 32 bit will use 2GB max (as it used to be), but 64bit will use whatever
number of megabytes fits into integer.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D2972
2018-01-10 11:09:10 +01:00
Sergey Sharybin
f0610563ee math utils: Add size_t version of min and max functions 2018-01-10 11:06:44 +01:00
Campbell Barton
f59303bead Fix color for manipulator drawing
Was drawing black after the first draw call.
For now set the shader before each draw call,
noted as TODO to investigate a nicer way to handle.
2018-01-10 20:50:14 +11:00
Campbell Barton
2b56faebe5 Merge branch 'master' into blender2.8 2018-01-10 19:58:05 +11:00
Campbell Barton
18f53d8822 Cleanup: comment block alignment 2018-01-10 19:57:02 +11:00
Campbell Barton
bc02c5de49 Alternate fix for brush user count
This reverts change to BKE_brush_add,
callers now remove the extra user.

Note this isn't very convenient for callers but
is consistent with other ID types.

In the future we will probably remove this and have new
ID's created with zero users.
2018-01-10 19:34:34 +11:00
Campbell Barton
3f837341c8 Correction to brush user commit
RNA API was compensating for the extra user.
2018-01-10 18:31:54 +11:00
Campbell Barton
6e6b79de35 Fix brush user count
New brushes had 2 users on adding.
Caused assert removing them after.
2018-01-10 17:45:34 +11:00
Campbell Barton
5ff33ecdf0 Merge branch 'master' into blender2.8 2018-01-10 14:01:09 +11:00
Germano
5c3dc01f54 Draw Manager: Edit Mode: Curve: uniforms were not being setted 2018-01-10 00:40:02 -02:00
Germano
7d865bc4ab Fix T53748: uniform globalsBlock was not being added was not being added to the shaders of the curves handles 2018-01-10 00:08:51 -02:00
Campbell Barton
cacba951ea Correct typos 2018-01-10 12:43:29 +11:00
Campbell Barton
fdd3d969a6 Fix T53491: Absolute tablet motion detection fails
When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.

Pressing Enter to run a tool for e.g. would use relative motion.

Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.
2018-01-10 12:41:45 +11:00
bjornmose
9aada45e52 fix t53701 minimal changes to get it working right 2018-01-10 01:51:04 +01:00
mano-wii
3c6e19b30b Curve/Surface Display: UV support 2018-01-10 10:11:32 +11:00
Bastien Montagne
0f6ed7d111 Fix (unreported) potential crash.
RNA_pointer_as_string could return NULL instead of a valid string in some cases.
2018-01-09 19:51:50 +01:00
Clément Foucault
a0655ed487 Eevee: Fix AO in planar reflections. 2018-01-09 19:01:24 +01:00
Clément Foucault
8aaf7bc438 Eevee: Fix Planar probe refresh. 2018-01-09 18:59:13 +01:00
Sergey Sharybin
5fe87a0a8c Task scheduler: Use single thread branch when range fits into single chunk 2018-01-09 18:10:47 +01:00