Commit Graph

830 Commits

Author SHA1 Message Date
Antonio Vazquez
51d9f56f87 GPencil: Invert Paste operator and make Paste to Active default
Before there were two options: Paste to original layer called "Paste" and Paste to active   layer called "Paste & Merge"

Now, by default the paste is in active layer and the "Paste & Merge" has been renamed "Paste".

For old "Paste", now is called "Paste by Layer" and it's not the default value anymore.

Note: Minor edits to add icons not present in Differential revision.

Differential Revision: https://developer.blender.org/D5591
2019-08-26 15:49:16 +02:00
Lazydodo
b9f61eb874 Cycles: Fix Architecture logging on x64.
x64 builds with WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 not defined
since SSE2 is the lower bar for x64 cpus. Turning the architecture
logging related if into the last if in the architecture detection
chain, which will never execute unless you turn off all kernels
in de debug flags.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5579
2019-08-26 07:22:44 -06:00
Campbell Barton
2425401a59 Cleanup: spelling 2019-08-04 12:51:44 +10:00
Sergey Sharybin
7ad21c3876 Fix T66604: Cycles bake crash on specific scene with volume
The issue was caused by un-initialized local storage for volume
intersection hits which are supposed to be stored in per-thread
KernelGlobals.

Fix is to make thread_shader() be the same as thread_render() in
respect of KernelGlobals.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5230
2019-07-11 15:44:09 +02:00
Campbell Barton
cd6b49f995 Cleanup: spelling 2019-07-07 15:38:41 +10:00
Aaron Carlisle
fdcfc263e9 Use latest/version number for manual links
We want users to go to the current version for their current version 
when possible if not point to latest.

/dev should really only be for development related work. End users 
should not be browsing /dev unless they are reading about upcoming 
features ahead of time.
2019-07-04 18:24:36 -04:00
b10921f0cc Fix Cycles CUDA suboptimal performance on Windows 10 with recent graphics cards
When compute preemption is available we schedule more work which is more
efficient. However the CUDA driver appears to be incorrectly reporting this as
unavailable, even though it should be supported starting with Windows 10 1803
and Pascal and Turing (10x0 and 20x0) graphics cards.

This reduces render time by about a 25% difference on our benchmark scenes. On
Linux compute preemption appears to be reported correctly.
2019-06-18 20:05:36 +02:00
Lukas Stockner
cc600de669 Cycles Denoising: Get rid of halos around bright edges
Previously, bright edges (e.g. caused by rim lighting) would sometimes get
halos around them after denoising.

This change introduces a log(1+x) highlight compression step that is performed
before denoising and reversed afterwards. That way, the denoising algorithm
itself operates in the compressed space and therefore bright edges cause less
numerical issues.
2019-06-01 00:45:03 +02:00
Sergey Sharybin
fced0f0437 Cycles: Don't advertise BVH8 being supported on 32bit platforms
The kernel does not use AVX2 vectorization, and trying to use BVH8 was
leading to an empty scenes.

Fixes T64624: Ctest : Win32 + AVX2 fails virtually all cycles tests
2019-05-16 11:51:25 +02:00
b63ffa8919 Fix Cycles build error after recent changes
We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.
2019-05-14 15:06:23 +02:00
a5c89574a3 Fix Cycles assert on exit after recent changes 2019-05-03 18:04:47 +02:00
fadb6f3466 Cleanup: refactor Cycles OSL texture handling
This adds our own OSL texture handle, that has info for OIIO textures or our
own custom texture types. A filename to handle hash map is used for lookups.
This is efficient because it happens at OSL compile time, because the optimizer
can figure out constant strings and replace them with texture handles.
2019-05-03 15:36:20 +02:00
Campbell Barton
c47d669f24 Cleanup: comments (long lines) in cycles 2019-05-01 21:41:07 +10:00
Campbell Barton
9ade9d247d CMake: fix Cycles linking with OpenCL 2019-04-19 14:00:16 +02:00
Campbell Barton
108045faa0 ClangFormat: format '#if 0' code in intern/ 2019-04-17 08:17:13 +02:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
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-04-17 06:21:24 +02:00
Campbell Barton
5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
Campbell Barton
813e470eac CMake: cleanup, arg rename, add definitions last 2019-04-16 06:15:18 +02:00
c515ea2e93 Fix vertex array leak in Cycles viewport drawing. 2019-03-26 19:56:43 +01:00
Campbell Barton
5ef4b0438c Cleanup: trailing space 2019-03-19 15:08:16 +11:00
e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
9873005ecd Cleanup: simplify kernel features definition.
No functional changes, logic here got too complex after many changes over
the years.
2019-03-17 12:01:19 +01:00
e17f7af0ce Cleanup: remove Cycles advanced shading features toggle.
It's effectively always enabled, only not on some unsupported OpenCL devices.
For testing those it's not useful to disable these features. This is replaced
by the more fine grained feature toggles that we have now.
2019-03-17 01:58:39 +01:00
b9af4efe41 Cleanup: fix compiler warnings. 2019-03-16 20:21:16 +01:00
bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +01:00
65d95879f7 Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.
2019-03-15 16:52:28 +01:00
Jeroen Bakker
5051e580e4 Merge branch 'blender2.7' 2019-03-15 16:28:33 +01:00
Jeroen Bakker
2f6257fd7f Cycles/OpenCL: Compile Kernels During Scene Update
The main goals of this change is faster starting when using foreground
rendering.

This patch will build kernels in parallel to the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used.

These AO kernels are fast to compile (3-7 seconds) and can be
reused by all scenes. When the final kernels become available we
will switch to these kernels.

In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.

Reviewed By: brecht, #cycles

Maniphest Tasks: T61752

Differential Revision: https://developer.blender.org/D4428
2019-03-15 16:18:21 +01:00
Jeroen Bakker
6237743111 Cycles/OpenCL: Added missing opencl programs
The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.
2019-03-15 08:11:28 +01:00
645cc3e871 Merge branch 'blender2.7' 2019-03-12 14:22:53 +01:00
Jeroen Bakker
298dabc79b Cycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
This patch will reduce the number of times that we need to
recompile kernels. It does this by (en/dis)abling features
by default. So when the user needs them that the kernels are
already available.

Other features are enabled by default for background and foreground
rendering. When in background rendering the user wants the best
render performance. When in foreground rendering the user wants
the least amount of recompilations.

Enabling volumetrics or subdivision evaluation will still trigger
a recompilation during foreground rendering.

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D4485
2019-03-12 14:06:45 +01:00
Julian Eisel
4041249943 Merge branch 'blender2.7'
Conflicts:
	intern/cycles/blender/addon/properties.py
	intern/cycles/device/opencl/opencl_split.cpp
2019-03-09 17:19:52 +01:00
Jeroen Bakker
02a7e875d7 Cycles OpenCL: Remove single program
Part of the cleanup of the OpenCL codebase.
Single program is not effective when using OpenCL, it is slower
to compile and slower during rendering (when used in for example
`barbershop` or `victor`).

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

Differential Revision: https://developer.blender.org/D4481
2019-03-08 16:31:35 +01:00
Jeroen Bakker
12a32d1bf1 Codestyle: comments 2019-03-08 07:19:48 -07:00
Jeroen Bakker
76442e676e Codestyle: comments 2019-03-08 08:56:16 +01:00
ebcea3029d Merge branch 'blender2.7' 2019-03-06 13:45:21 +01:00
f08191a459 Fix Cycles build error on non-x86 processors. 2019-03-06 13:37:06 +01:00
4d9697a5a9 Merge branch 'blender2.7' 2019-02-26 20:07:36 +01:00
564d252d60 Cleanup: remove unnecessary assert. 2019-02-26 20:01:20 +01:00
Ray Molenkamp
ff304d3665 Cycles: Fix build error
introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1
2019-02-26 08:32:41 -07:00
Ray Molenkamp
07c0174717 Cycles: Fix build error
introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1
2019-02-26 08:33:47 -07:00
Jeroen Bakker
15edae617f Merge branch 'blender2.7' 2019-02-26 14:07:57 +01:00
Jeroen Bakker
dabe5cd31a T61971: Compilation Displacement/Background Kernel
Displacement and Background kernels are selectively used, but always compiled. This patch will not compile these kernels when they are not needed.

Displacement kernel is only used for true displacement.
Background kernel is only used when there is a (Cycles)Light of type `LIGHT_BACKGROUND`.

Reviewed By: brecht, #cycles

Tags: #cycles

Maniphest Tasks: T61971

Differential Revision: https://developer.blender.org/D4412
2019-02-26 14:06:25 +01:00
Jeroen Bakker
e6099c7e46 T61576: Do Not (Re-)Compile OpenCL kernels
The goal of this patch is to have limit the number of times
kernels needs to be compiled and are reused as kernels with
different compile directives can lead to identical same
binaries.

The implementation does this by stripping the compile directives.
and reshuffling kernels so the output is more likely to be the
same.

We focussed on the kernels where it was easy to detect and maintain
(bundle, bake, displace, do_volume and background). More optimizations
could be done but they are probably less obvious.

Merged the data_init and state_buffer_size kernels to split_bundle.

This patch will also remove empty kernels for do_volume and bake
when their features are not enabled.

When using the benchmark files there are less background, bake and
do_volume kernels compiled.

Fix: T61576, T61501, T61466

Reviewed By: brecht, #cycles

Differential Revision: https://developer.blender.org/D4390
2019-02-26 12:45:26 +01:00
d6b5ee99fe Merge branch 'blender2.7' 2019-02-21 18:04:02 +01:00
f1304c973f Fix T61810: Cycles OpenCL denoising broken after recent changes. 2019-02-21 16:47:04 +01:00
Sergey Sharybin
8986c92b65 Merge branch 'blender2.7' 2019-02-21 15:33:07 +01:00
Jeroen Bakker
6e9dca2214 Codestyle: Indentation 2019-02-21 08:52:04 +01:00
9a9336cb45 Merge branch 'blender2.7' 2019-02-20 19:07:25 +01:00
fda79dbd79 Cleanup: fix compiler warning. 2019-02-20 16:39:12 +01:00
Jeroen Bakker
8a4cdda373 Merge branch 'blender2.7' 2019-02-20 15:22:23 +01:00
Jeroen Bakker
949ab753bb Cycles OpenCL: Remove OpenCL MegaKernel
Using OpenCL MegaKernel has been slow and therefore not usefull.
This patch will remove the mega kernel from the OpenCL codebase
and the OpenCLDeviceBase class.

T61736: removal of mega kernel
T61703: baking does not work with mega kernel

Tags: #cycles

Differential Revision: https://developer.blender.org/D4383
2019-02-20 15:17:22 +01:00
e2a90b8045 Merge branch 'blender2.7' 2019-02-19 19:00:46 +01:00
Jeroen Bakker
667033e89e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:34:55 +01:00
Jeroen Bakker
15edda3a8e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:33:50 +01:00
8138eb0dfe Fix Cycles OpenCL multithreaded compilation not working on Windows. 2019-02-19 13:48:56 +01:00
9800837b98 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Patch by lukasstockner97, jbakker, brecht

    job    |   scene_name    | compilation_time
----------+-----------------+------------------
    Baseline | empty           |            22.73
    D2264    | empty           |            13.94
    Baseline | bmw             |            56.44
    D2264    | bmw             |            41.32
    Baseline | fishycat        |            59.50
    D2264    | fishycat        |            45.19
    Baseline | barbershop      |           212.28
    D2264    | barbershop      |           169.81
    Baseline | victor          |            67.51
    D2264    | victor          |            53.60
    Baseline | classroom       |            51.46
    D2264    | classroom       |            39.02
    Baseline | koro            |            62.48
    D2264    | koro            |            49.03
    Baseline | pavillion       |            54.37
    D2264    | pavillion       |            38.82
    Baseline | splash279       |            47.43
    D2264    | splash279       |            37.94
    Baseline | volume_emission |           145.22
    D2264    | volume_emission |           121.10

This patch reduced compilation time as the split kernels and base
kernels are compiled in parallel. In cycles debug mode (256) you can set
unmark the opencl single program file, what reduces the compilation time
even further (bmw 17 seconds, barbershop 53 seconds).

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:56:20 +01:00
4ce9785e01 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:49:25 +01:00
74a3d9b410 Merge branch 'blender2.7' 2019-02-13 14:34:26 +01:00
3866161da8 Fix T61457, T61489, T61482: build errors and memory warning in Cycles.
For OIIO 2.x we must use unique_ptr. This also required updating the
guarded allocator for std::move to work. Since C++11 construct/destroy
have a default implementation that also works this case, so we just
leave it out.
2019-02-13 14:00:36 +01:00
Lukas Stockner
e379a9ba91 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!

Differential Revision: https://developer.blender.org/D3889
2019-02-11 13:39:08 +01:00
3f8e263709 Merge branch 'blender2.7' 2019-02-11 13:37:45 +01:00
Lukas Stockner
c10f5d15c2 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!
2019-02-11 13:32:54 +01:00
e21ae0bb26 Merge branch 'blender2.7' 2019-02-06 15:22:53 +01:00
Lukas Stockner
fccf506ed7 Cycles: animation denoising support in the kernel.
This is the internal implementation, not available from the API or
interface yet. The algorithm takes into account past and future frames,
both to get more coherent animation and reduce noise.

Ref D3889.
2019-02-06 15:18:42 +01:00
Lukas Stockner
405cacd4cd Cycles: prefilter feature passes separate from denoising.
Prefiltering of feature passes will happen during rendering, which can
then be used for denoising immediately or written as a render pass for
later (animation) denoising.

The number of denoising data passes written is reduced because of this,
leaving out the feature variance passes. The passes are now Normal,
Albedo, Depth, Shadowing, Variance and Intensity.

Ref D3889.
2019-02-06 15:18:29 +01:00
f4b1f1f0be Merge branch 'blender2.7' 2019-01-30 18:36:54 +01:00
001414fb2f Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.
We've had many reported crashes on Windows where we suspect there is a
corrupted OpenCL driver. The purpose here is to keep Blender generally
usable in such cases.

Now it always shows None / CUDA / OpenCL in the preferences, and only when
selecting one will it reveal if there are any GPUs available. This should
avoid crashes when opening the preferences or on startup.

Differential Revision: https://developer.blender.org/D4265
2019-01-29 17:00:02 +01:00
Stefan Werner
5e121c8eab Cycles: Fixed uninitialized memory
Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.
2019-01-18 15:17:21 +01:00
60799d6fee Merge branch 'blender2.7' 2019-01-09 17:20:58 +01:00
b7fb3296c1 Fix T60300, T57774: Cycles OpenCL viewport crash with subsurface scattering. 2019-01-09 16:42:03 +01:00
bdfc10e482 Fix T59349: Cycles viewport render flickering when changing some settings. 2019-01-03 19:21:10 +01:00
Sergey Sharybin
4fe578c827 Merge branch 'master' into blender2.8 2018-12-07 15:00:48 +01:00
Sergey Sharybin
bb0d812d98 Cycles: Disable OpenCL on macOS
This is unfortunate, but the number of bugs in this configuration
keeps growing, and almost all of them are caused by bug in OpenCL
compiler.

The compiler is not likely to be fixed, since Apple declared OpenCL
deprecated.

This evil commit is aimed to keep officially supported features
of Blender in a good working and stable state.
2018-12-07 14:37:47 +01:00
63c0653170 Merge branch 'master' into blender2.8 2018-11-29 23:54:30 +01:00
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
9893fee4e6 Merge branch 'master' into blender2.8 2018-11-29 12:55:58 +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
059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11:00
Campbell Barton
e742e0934d Cleanup: trailing space 2018-11-25 08:01:14 +11:00
Sergey Sharybin
8610b57271 Cycles: Cleanup, code style 2018-11-15 17:19:26 +01:00
Sergey Sharybin
78a6689aea Merge branch 'master' into blender2.8 2018-11-09 14:34:33 +01:00
Sergey Sharybin
203de0bbf0 Cycles: Cleanup, space after (void)
It was used in like 95% of places.
2018-11-09 12:08:51 +01:00
Sergey Sharybin
2330cadb0f Cycles: Cleanup, don't use strict C prototypes
Those are more like a legacy of language, which is not
needed in C++.
2018-11-09 12:04:41 +01:00
Sergey Sharybin
c86d4b1d80 Cycles: Cleanup, split array from vector
Those are similar but different types, no reason to keep
their definitions in a single file.
2018-11-09 11:54:24 +01:00
Sergey Sharybin
cb4b5e12ab Cycles: Cleanup, spacing after preprocessor
It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.
2018-11-09 11:34:54 +01:00
Stefan Werner
9d0eac6ba5 Merge branch 'master' into blender2.8 2018-11-07 14:30:09 +01:00
Stefan Werner
2c5531c0a5 Cycles: Added Embree as BVH option for CPU renders.
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

Differential Revision: https://developer.blender.org/D3682
2018-11-07 12:58:12 +01:00
Sergey Sharybin
fc12a736bb Merge branch 'master' into blender2.8 2018-10-31 11:49:04 +01:00
Sergey Sharybin
e0cc3e9809 Cycles: Fix wrong BVH used when disabling AVX2 in debug settings
Mainly useful for debugging. Previously, when AVX2 was disabled
in the debug panel but BVH layout was kept on BVH8 nothing was
rendered.

Needed to make it so supported BVH layout mask for devices is
queried in "dynamic", so it is possible to use DebugFlags there.
2018-10-31 11:46:52 +01:00
046735d751 Merge branch 'master' into blender2.8 2018-10-28 16:41:30 +01:00
Stefan Werner
e58c6cf0c6 Cycles: Added Cryptomatte output.
This allows for extra output passes that encode automatic object and material masks
for the entire scene. It is an implementation of the Cryptomatte standard as
introduced by Psyop. A good future extension would be to add a manifest to the
export and to do plenty of testing to ensure that it is fully compatible with other
renderers and compositing programs that use Cryptomatte.

Internally, it adds the ability for Cycles to have several passes of the same type
that are distinguished by their name.

Differential Revision: https://developer.blender.org/D3538
2018-10-28 05:37:41 -04:00
Campbell Barton
793d5cb7fd Merge branch 'master' into blender2.8 2018-10-09 10:41:13 +11:00
Lukas Stockner
7920ebd157 Cycles: Fix NLM denoising kernels zeroing the wrong buffer on OpenCL
Since my temporary buffer commit (about a month ago), the OpenCL device was zeroing the wrong buffer, leading to
completely wrong filtered feature passes and therefore significantly lower-quality results than CPU and CUDA.
2018-10-09 00:14:29 +02:00
Campbell Barton
733e6c0b1d Merge branch 'master' into blender2.8 2018-10-09 08:46:00 +11:00
Lukas Stockner
7aaeb06fb6 Cycles: Clean up extra minus in previous commit
Forgot to add that change, sorry for the noise.
2018-10-08 22:22:05 +02:00
Lukas Stockner
0234de7d85 Cycles: Reuse existing buffer in the NLM denoising kernels on CPU 2018-10-08 22:17:06 +02:00
Lukas Stockner
15e9d80375 Cycles: Use existing shared temporary memory in reconstruction step of the denoiser
Previously the code allocated its own temporary memory, but it's possible to just use the existing shared one instead.
2018-10-08 22:13:40 +02:00
Lukas Stockner
a0cc7bd961 Cycles: Implement vectorized NLM kernels for faster CPU denoising 2018-10-06 21:49:54 +02:00
Sergey Sharybin
a53c81c60b Merge branch 'master' into blender2.8 2018-09-19 18:42:17 +02:00
Sergey Sharybin
a5101e4da8 Cycles: Cleanup, double semicolon 2018-09-19 18:41:43 +02:00
Bastien Montagne
30a2ad8efe Merge branch 'master' into blender2.8 2018-09-03 15:33:07 +02:00
Alex Fuller
107f1c0a2b Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).
Differential Revision: https://developer.blender.org/D3669
2018-09-03 12:03:56 +02:00
Sergey Sharybin
af21053087 Merge branch 'master' into blender2.8 2018-08-30 17:40:06 +02:00
Sergey Sharybin
94ea566b5a Cycles: Cleanup, whitespace after keyword 2018-08-30 17:34:11 +02:00
Sergey Sharybin
31278eb4bc Merge branch 'master' into blender2.8 2018-08-29 16:09:59 +02:00
Sergey Sharybin
73f2056052 Cycles: Add BVH8 and packeted triangle intersection
This is an initial implementation of BVH8 optimization structure
and packated triangle intersection. The aim is to get faster ray
to scene intersection checks.

    Scene                BVH4      BVH8
barbershop_interior    10:24.94   10:10.74
bmw27                  02:41.25   02:38.83
classroom              08:16.49   07:56.15
fishy_cat              04:24.56   04:17.29
koro                   06:03.06   06:01.45
pavillon_barcelona     09:21.26   09:02.98
victor                 23:39.65   22:53.71

As memory goes, peak usage raises by about 4.7% in a complex
scenes.

Note that BVH8 is disabled when using OSL, this is because OSL
kernel does not get per-microarchitecture optimizations and
hence always considers BVH3 is used.

Original BVH8 patch from Anton Gavrikov.
Batched triangles intersection from Victoria Zhislina.
Extra work and tests and fixes from Maxym Dmytrychenko.
2018-08-29 15:03:09 +02:00
871b7ba892 Merge branch 'master' into blender2.8 2018-08-28 19:15:08 +02:00
Lukas Stockner
94efc651d4 Cycles Denoiser: Allocate a single temporary buffer for the entire denoising process
With small tiles, the repeated allocations on GPUs can actually slow down the denoising quite a lot.
Allocating the buffer just once reduces rendertime for the default cube with 16x16 tiles and denoising on a mobile 1050 from 22.7sec to 14.0sec.
2018-08-25 12:23:52 -07:00
Sergey Sharybin
658a9c6cf5 Cycles: Cleanup, style
I wouldn't mind changing style to have space after keyword, but there was
no official code style change proposed.
2018-08-24 14:36:18 +02:00
Campbell Barton
f7c1716b6c Merge branch 'master' into blender2.8
Fixes enum-flags having no text w/ property-split
2018-08-15 15:56:20 +10:00
Stefan Werner
a9700e7ad2 Fix T56359: Unitialized variable in Cycles OpenCL could cause crashes. 2018-08-14 22:51:53 +02:00
Sergey Sharybin
b70f85f2aa Merge branch 'master' into blender2.8 2018-08-09 16:03:09 +02:00
fclem
e20a0798dc Cycles: Append compute units for RX Vega card names
Makes it more clear whether compute device is Vega 56 or Vega 64.
2018-08-09 15:51:23 +02:00
fclem
01feb5d6cc Cycles: Report more details about OpenCL devices 2018-08-09 15:51:23 +02:00
Philipp Oeser
ccef83b2fb Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/screen/screen_edit.c
2018-07-06 12:30:48 +02:00
Stefan Werner
df30b50f2f Cycles: Enabled half precision textures for OpenCL devices that support the cl_khr_fp16 extension. 2018-07-06 11:42:34 +02:00
Campbell Barton
de777ad9e6 Merge branch 'master' into blender2.8 2018-07-06 10:18:52 +02:00
Campbell Barton
1daa20ad9f Cleanup: strip trailing space for cycles 2018-07-06 10:17:58 +02:00
Campbell Barton
8dff538989 Merge branch 'master' into blender2.8 2018-07-05 22:46:04 +02:00
Stefan Werner
4d00e95ee3 Cycles: Adding native support for UINT16 textures.
Textures in 16 bit integer format are sometimes used for displacement, bump and normal maps and can be exported by tools like Substance Painter. Without this patch, Cycles would promote those textures to single precision floating point, causing them to take up twice as much memory as needed.

Reviewers: #cycles, brecht, sergey

Reviewed By: #cycles, brecht, sergey

Subscribers: sergey, dingto, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3523
2018-07-05 13:53:34 +02:00
Campbell Barton
49b86bcfec Merge branch 'master' into blender2.8 2018-07-05 07:54:47 +02:00
Lukas Stockner
c960804747 Cycles Denoising: Pass tile buffers to every OpenCL kernel to conform to standard and get rid of set_tile_info 2018-07-04 14:38:03 +02:00
Lukas Stockner
f1525cf534 Cycles Denoising: Correctly handle target buffer in tile unmapping and move device swap logic to the device_memory 2018-07-04 14:37:55 +02:00
Lukas Stockner
9db8bdbc65 Cycles Denoising: Cleanup: Rename tiles to tile_info 2018-07-04 14:37:24 +02:00
Lukas Stockner
97a0d6fcc7 Cycles Denoising: Refactor denoiser tile handling
This deduplicates the calls for tile (un)mapping and allows to have a target buffer that is different from the source buffer (needed for baking and animation denoising).
2018-07-04 14:36:01 +02:00
Lukas Stockner
b10c64bd2f Cycles Denoising: Split main function into logical steps 2018-07-04 14:35:05 +02:00
Sybren A. Stüvel
b4c01aca30 Merge branch 'master' into blender2.8 2018-06-26 17:42:33 +02:00
Stefan Werner
73eb1bfd55 Revert "Turned off clang warnings in third party includes."
This reverts commit d53093953f8f3b58600cb19020ecbe0b5f254b52.
2018-06-26 10:26:56 +02:00
Campbell Barton
ea339dc62c Merge branch 'master' into blender2.8 2018-06-26 09:34:13 +02:00
Stefan Werner
d53093953f Turned off clang warnings in third party includes.
The latest clang compiler (at least the one in Xcode 9.4.1) warns about the register keyword and macro expansions using defined().
Since these warnings come from third party code, we can't address them directly in Blender. Silencing them via #pramgas will
at least keep the warnings during a build down to the ones that are relevant to Blender code.
2018-06-25 23:02:01 +02:00
Campbell Barton
c054a1a848 Merge branch 'master' into blender2.8 2018-06-21 15:02:38 +02:00
a283333cd8 Fix Cycles CUDA render errors with CUDA 9.2.
Work around what might be a compiler bug.
2018-06-21 12:32:32 +02:00
Bastien Montagne
c98b2e74df Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_relations.c
2018-06-12 12:38:54 +02:00
Lukas Stockner
7bf4023689 Fix T55448: Typo in Cycles CUDA debug output
Reviewers: sergey, lukasstockner97

Reviewed By: lukasstockner97

Tags: #cycles, #bf_blender

Differential Revision: https://developer.blender.org/D3472
2018-06-12 10:45:32 +02:00
Campbell Barton
d09920687c Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
Lukas Stockner
16c05161e7 Cycles: Cleanup: Remove double semicolons 2018-04-29 09:28:41 +02:00
Clément Foucault
9ff8195535 OpenGL: Remove remaining instances of GL_RGBA16F_ARB.
There is no need for it now that we use opengl 3.3. Use GL_RGBA16F instead.
2018-04-24 12:48:43 +02:00
Sergey Sharybin
eaf8608ba5 Merge branch 'master' into blender2.8 2018-04-04 09:54:50 +02:00
Mai Lavelle
8c4d28cdb9 Fix T54400: Some GCN 1 cards available to select for use with Cycles
Hainan was missing from the list of GCN 1 cards.
2018-04-03 23:15:07 -04:00
Campbell Barton
2bc952fdb6 Merge branch 'master' into blender2.8 2018-02-18 22:33:05 +11:00
fee4b646c4 Cycles: tweak CUDA messages and avoid build errors with existing sm_2x configs. 2018-02-18 00:53:25 +01:00
1dcd7db73d Code cleanup: remove some more unused code after recent CUDA changes. 2018-02-18 00:53:03 +01:00
Thomas Dinges
9e717c0495 Cycles: Remove Fermi texture code.
This should be the last Fermi removal commit, unless I missed something.
It's been a pleasure Fermi!
2018-02-17 22:56:58 +01:00
Thomas Dinges
2eaf90b305 Cycles: Remove Fermi support from CMake and update runtime checks in device_cuda.cpp.
Fermi code in Cycles kernel and texture system are coming next.
2018-02-17 16:15:07 +01:00
ade2aaba09 Merge branch 'master' into blender2.8 2018-02-07 17:17:24 +01:00
1dafe759ed Update CUEW to latest version
This brings separate initialization for libcuda and libnvrtc, which
fixes Cycles nvrtc compilation not working on build machines without
CUDA hardware available.

Differential Revision: https://developer.blender.org/D3045
2018-02-07 11:53:01 +01:00
Campbell Barton
5376c739f5 Merge branch 'master' into blender2.8 2018-02-06 23:06:23 +11:00
ce3e0afe59 Fix T54001: AMD OpenCL fails with certain resolutions, after recent changes.
We should actually be using CL_DEVICE_MEM_BASE_ADDR_ALIGN for sub buffers,
previous change in this code was incorrect. Renamed the function now to
make the specific purpose of this alignment clear, it's not required for
data types in general.
2018-02-05 22:19:49 +01:00
Campbell Barton
eeb621566a Merge branch 'master' into blender2.8 2018-02-04 10:46:34 +11:00