Commit Graph

650 Commits

Author SHA1 Message Date
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