Commit Graph

71123 Commits

Author SHA1 Message Date
a8b8da5567 Fix T58183: crash with CPU + GPU rendering after profiling changes.
Multi-device was not passing along profiler to the CPU.
2018-11-29 23:43:27 +01:00
Campbell Barton
8ac2d85d2f Cleanup: trailing space 2018-11-30 08:38:25 +11:00
Gaia Clary
3c767cecce add: visual studio Compiler warning (order of attribute init in c++ constructors) 2018-11-29 17:04:12 +01:00
2c154399a2 Fix internal compiler error when building with VS 2017 (15.9.3).
It doesn't like alignment for function arguments, and I don't think this
alignment is needed.

Solution found by Ray Molenkamp.
2018-11-29 16:42:52 +01:00
Sergey Sharybin
b00819bcca Atomic: Avoid conflicts with definitions in other areas
While atomics library was trying to use "user-space" defined
LIKELY() and UNLIKELY(), this is not always true that user
code was checking for those macro coming from an unrelated
area.
2018-11-29 09:33:50 +01:00
Campbell Barton
140f2209b6 Cleanup: correct typo, no need for ./ prefix 2018-11-29 12:54:30 +11:00
Campbell Barton
2089feeb1b Fix leak in CPU brand check 2018-11-29 12:52:39 +11:00
Lukas Stockner
7fa6f72084 Cycles: Add sample-based runtime profiler that measures time spent in various parts of the CPU kernel
This commit adds a sample-based profiler that runs during CPU rendering and collects statistics on time spent in different parts of the kernel (ray intersection, shader evaluation etc.) as well as time spent per material and object.

The results are currently not exposed in the user interface or per Python yet, to see the stats on the console pass the "--cycles-print-stats" argument to Cycles (e.g. "./blender -- --cycles-print-stats").

Unfortunately, there is no clear way to extend this functionality to CUDA or OpenCL, so it is CPU-only for now.

Reviewers: brecht, sergey, swerner

Reviewed By: brecht, swerner

Differential Revision: https://developer.blender.org/D3892
2018-11-29 02:45:24 +01:00
Campbell Barton
fb057153b0 CMake: update checker
Support skipping cmake files
2018-11-29 08:55:05 +11:00
Sergey Sharybin
2b371b65bc More fixes for NUMA on macOS 2018-11-28 18:05:35 +01:00
Sergey Sharybin
8a6aa15903 Fix compilation error on macOS 2018-11-28 17:57:04 +01:00
Sergey Sharybin
547bc2a620 Fix compilation error on 32bit Windows 2018-11-28 17:54:58 +01:00
Bastien Montagne
c16321cb9d Fix building gtests and bplayer after recent NumaAPI addition.
Seriously... like, seriously...
2018-11-28 16:50:02 +01:00
Sergey Sharybin
ce927e15e0 Tweaks for threading schedule for Threadripper2 and EPYC
The idea is to make main thread and job threads to be scheduled
on CPU dies which has direct access to memory (those are NUMA
nodes 0 and 2).

We also do this for new EPYC CPUs since their NUMA nodes 1 and 3
do have access but only to a higher range DDR slots. By preferring
nodes 0 and 2 on EPYC we make it so users with partially filled
DDR slots has fast memory access.

One thing which is not really solved yet is localization of
memory allocation: we do not guarantee that memory is allocated
on the closest to the NUMA node DDR slot and hope that memory
manager of OS is acting in favor of us.
2018-11-28 14:41:22 +01:00
Sergey Sharybin
b3e2c69416 Add utility function to query CPU brand string 2018-11-28 14:35:26 +01:00
Sergey Sharybin
683662e630 Add cross-platform NUMA library
Makes it simple to use NUMA libraries on various platforms.
2018-11-28 14:35:26 +01:00
Campbell Barton
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
Sergey Sharybin
acd1d1a31d CMake: Remove Cycles specific OpenSubdiv options
Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.
2018-11-26 11:41:38 +01:00
33750e8abb Fix T58006: smart UV project island margin should not use length units.
This distance is in UV space, not world space.
2018-11-24 23:43:03 +01:00
487af39c99 Sequencer: remove unnecessary limit on transform rotation. 2018-11-24 23:43:03 +01:00
7c19d9e9af Fix X11 tablet pen and eraser distinction being wrong in some cases.
This extends the earlier fix to use the latest logic from Wine's wintab.c,
to better handle eraser detection.
2018-11-24 23:24:32 +01:00
Campbell Barton
b348d1ac62 Cleanup: remove unused file 2018-11-25 08:05:42 +11:00
Campbell Barton
e742e0934d Cleanup: trailing space 2018-11-25 08:01:14 +11:00
Jens Verwiebe
e5bc9fae54 Fix penpressure for tablets that use libinput on linux 2018-11-24 18:26:20 +01:00
Stefan Werner
874f12480f Cycles: Fixed a warning. 2018-11-23 13:47:25 +01:00
Stefan Werner
aa000400dc Cycles: Improved robustness of hair motion blur.
In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey, brecht, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3695
2018-11-23 13:25:26 +01:00
956e58679c Fix T57998: crash at start with jemalloc package on some Linux distributions.
The jemalloc library must be ahead of pthread in linking order, so jemalloc
can find the pthread symbols for its background thread.
2018-11-23 11:26:31 +01:00
Campbell Barton
c66570f519 Fix T57989: File loaded as startup
The file contents was used to check if the file was a startup file.

Now pass in an argument from startup loading code instead.
2018-11-22 15:06:14 +11:00
Sergey Sharybin
968bf0df14 Fix T57811: Render crashes in certain scenes when AO Bounces are used 2018-11-21 14:17:26 +01:00
Sergey Sharybin
6f48bfc7a8 Cycles: Cleanup, use utility function
Replaces inlined platform-specific code.
2018-11-21 13:51:18 +01:00
Sergey Sharybin
65143542af Cycles: Cleanup, reduce indentation level 2018-11-21 12:41:24 +01:00
Sergey Sharybin
700330afe8 Cycles: Cleanup, comments and dead code 2018-11-21 11:33:11 +01:00
Sergey Sharybin
65d01def80 Cycles: Cleanup, CUDA code path is not possible inside AVX2 2018-11-21 11:28:49 +01:00
Bastien Montagne
ec851efda9 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Second part of the fix: do not try at all to compute normals in degenerated
geometry. Just loss of time and potential issues later with weird
invalid computed values.
2018-11-20 17:54:48 +01:00
Bastien Montagne
c9c6433a59 Fix T57923: Freeze in mesh vnors computation code with some degenerated geometry.
Fix first part of it, the freeze itself being caused by float NAN values
never comparing equal to anything, not even themselves.
2018-11-20 17:52:21 +01:00
Sergey Sharybin
01e8e7dc6d Task scheduler: Optimize parallel loop over lists
The goal is to address performance regression when going from
few threads to 10s of threads. On a systems with more than 32
CPU threads the benefit of threaded loop was actually harmful.

There are following tweaks now:

- The chunk size is adaptive for the number of threads, which
  minimizes scheduling overhead.

- The number of tasks is adaptive to the list size and chunk
  size.

Here comes performance comparison on the production shot:

 Number of threads        DEG time before        DEG time after
       44                     0.09                   0.02
       32                     0.055                  0.025
       16                     0.025                  0.025
       8                      0.035                  0.033
2018-11-20 14:58:17 +01:00
Sybren A. Stüvel
9bc2570e2a Removed superfluous NULL check 2018-11-20 10:46:17 +01:00
Sybren A. Stüvel
0540d2b65c Added MovieClip.fps read-only property to RNA
This makes it possible for a Python script that loads a MovieClip into the
clip editor to also change the scene frame rate to match.
2018-11-20 10:32:24 +01:00
Roel Koster
f74fa98e53 Linux: list GVFS mount points 2018-11-19 08:53:19 +11:00
Sybren A. Stüvel
ec20d311da Call PRE_VIEW and POST_VIEW draw callbacks in movie clip editor 2018-11-16 13:59:16 +01:00
Sergey Sharybin
cd9ab9d99e Cycles: Cleanup, code style 2018-11-15 17:16:40 +01:00
Sergey Sharybin
74fdf68a41 Cleanup: Comments 2018-11-15 16:28:07 +01:00
Campbell Barton
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
Campbell Barton
b97a2c3688 Cleanup: naming for paint modes
- Rename ePaint* -> PAINT_MODE_*.
- Use PAINT_OVERLAY_ prefix for eOverlayControlFlags.
2018-11-14 11:20:08 +11:00
Campbell Barton
c1d29ea783 WM: enforce descriptions being NULL or defined
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
2018-11-14 09:47:23 +11:00
Campbell Barton
a5a86f3921 Cleanup: python doc-strings
Indentation & trailing space.
2018-11-14 09:26:53 +11:00
Campbell Barton
fe566a30f3 Cleanup: use lowercase 2d/3d in function names 2018-11-13 14:21:42 +11:00
Campbell Barton
20d06eb3a8 WM: avoid string replace w/ appconfig-activate
Better construct an exact path, this would fail if the path exists
multiple times in the string.
2018-11-13 07:02:51 +11:00
Sergey Sharybin
d23a53c74a Cycles: Fix/workaround for gcc-7.2
For some reason when building with gcc-7.2 (which is default
in previous Ubuntu LTS) the guarded allocator is not being
properly instantiated.

Doesn't happen with newer version of gcc-7 which is 7.3, and
also doesn't happen with gcc-6 and gcc-8.

Would be nice to know what is wrong, but for the time being
committing workaround which keeps Blender users happy.
2018-11-12 12:16:07 +01:00
Sergey Sharybin
e732c6af3b Cycles: Proper comment for closing header guard 2018-11-12 11:02:10 +01:00