Commit Graph

7444 Commits

Author SHA1 Message Date
d05b9e0a2e Fix build with older CMake versions that we still need to support. 2018-10-03 12:55:43 +02:00
d2da3af073 Fix T54287: memory not freed after rendering on Linux.
With new jemalloc versions memory allocated by threads that then become
inactive is not longer automatically freed. Instead we have to enable a
background thread to do it.

Some testing is needed to find out of this is sufficient, because the
background thread only runs periodically.
2018-10-03 12:09:31 +02:00
786870e26f Fix T56909: wrong interface scale on macOS 10.14, when using 10.14 SDK.
This does not affect existing releases as far as I can tell, only new builds
using the new SDK have the problem.
2018-10-01 08:35:32 +02:00
bbd3ac73bc Fix T56396: Cycles wrong object motion blur with deformation blur disabled. 2018-09-30 19:34:34 +02:00
Sergey Sharybin
de3ee3c6e8 Cycles: Fix compilation error of CUDA kernel
Was caused by previous commit.
2018-09-28 15:02:44 +02:00
Sergey Sharybin
b030277e79 Cycles: Fix crash with BVH8 on certain scenes
The crash was caused by BVH traversal stack being overflowed.

That overflow was caused by lots of false-positive intersections
for rays originating on a non-finite location.

Not sure why those rays will be existing in the first place,
this is to be investigated separately.

This commit moves pre-SSE4.1 check to a higher level function
and enables it for all miroarchitectures.
2018-09-28 13:57:50 +02:00
Sergey Sharybin
81f68bbba1 Fix compilation errors and warnings with Clang-6 2018-09-28 09:46:12 +02:00
bd267b0332 Fix cycles_cubin_cc build error on macOS. 2018-09-27 15:59:14 +02:00
e8e2f51063 Fix CUDA build with Xcode 10.0, use nvrtc due to incompatible compilers. 2018-09-27 15:20:33 +02:00
Sergey Sharybin
8f9a6b1bab Cycles: Cleanup 2018-09-27 14:49:37 +02:00
Sergey Sharybin
bee16ec4d8 Cycles: Sync BVH8 unaligned node packing code with BVH4
Similar to dfae3de6bdf.
2018-09-27 14:49:12 +02:00
2a63e062b0 Tests: add --no-window-focus to open window without focus.
This is useful to run OpenGL tests while continuing to do other tasks
without windows constantly popping up in the foreground.
2018-09-27 12:21:48 +02:00
Sergey Sharybin
a5101e4da8 Cycles: Cleanup, double semicolon 2018-09-19 18:41:43 +02:00
a0402074ed Fix wrong CUDA version warning in cmake.
Fix suggested by Dalai.
2018-09-19 16:24:45 +02:00
Campbell Barton
4c918efd44 Cleanup: trailing space 2018-09-19 12:04:34 +10:00
Ray Molenkamp
16b8d223b7 Cycles: Fix usage of AVX2 intrinsics in AVX kernel
While building the AVX kernel, util_avxf.h/avxb.h were using some AVX2 intrinsics,
these were never called, so it wasn't a run-time issue, but the intrinsics headers
on centos excluded the AVX2 prototypes when building the AVX kernel causing build errors.

This commit cleans up the improper usage of the AVX2 intrinsics and provides AVX
fallback implementations for future use.

Differential Revision: https://developer.blender.org/D3696
2018-09-17 16:27:13 -06:00
Sergey Sharybin
284cd1375b Cycles: Cleanup, remove dead code 2018-09-17 18:07:22 +02:00
Sergey Sharybin
81f1f9c85e Cycles: Remove unused malformed function
This isn't really possible to do the shuffle which was attempted to do.

While it's possible to achieve expected behavior, the function needs to
be rewritten. Since it's not used anyway, it's simpler to remove it for
now.
2018-09-17 18:05:32 +02:00
Sergey Sharybin
82e729d986 Cycles: Use proper mask for vectrorized boolean print 2018-09-17 18:02:01 +02:00
Sergey Sharybin
aa844ad676 Cycles: Don't allocate Extra if BSDF allocation failed
Failed as in did not allocate due to possibly weight cutoff.
Tryign to allocated Extra storage for closure in such situation
will consfuse Cycles and cause crashes later one due to obscure
values in ShaderData.
2018-09-12 12:28:55 +02:00
a1651ddc98 Build: require OpenJPEG 2.x minimum, remove bundled version.
* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
  the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
  OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
  will be disabled.
* install_deps.sh was updated with new package names, since distributions
  put this version in a new package.

Differential Revision: https://developer.blender.org/D3663
2018-09-11 12:45:05 +02:00
76a4042c23 Fix Cycles principled BSDF black with transmission and IOR 1.0. 2018-09-10 18:50:15 +02:00
a5bb401704 Cleanup: fix compiler warning. 2018-09-06 20:09:13 +02:00
0728c897d7 Fix T56704: black / NaN values in Cycles normal pass. 2018-09-06 20:06:23 +02:00
Mai Lavelle
feb3c74a05 Cycles: Allow cancel during displacement of meshes 2018-09-06 00:25:35 -04:00
Ray Molenkamp
19c7e499e1 cycles: Fix x86 build error.
WITH_CYCLES_CUDA_BINARIES was set as a regular variable causing it to be overwritten by the release.cmake settings.
2018-09-04 16:58:41 -06: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
Campbell Barton
0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
9492522db5 Fix T56618: crash when typing certain characters on Linux. 2018-08-31 12:43:39 +02:00
Sergey Sharybin
e51f51d55d Cycles: Cleanup, use explicit comparison with NULL 2018-08-31 12:28:12 +02:00
Sergey Sharybin
8ee76535da Fix T56626: Cycles ambient occlusion only local : crash
Was caused by missing NULL pointer check in BVH8.
2018-08-31 12:14:36 +02:00
Sergey Sharybin
94ea566b5a Cycles: Cleanup, whitespace after keyword 2018-08-30 17:34:11 +02:00
Sergey Sharybin
8c3d2e549c Cycles: Fix detection of CPU brand string on 32 bit platforms
The assembler template was backing up and restoring ebx, which is
fair enough. However, this did not prevent compiler for putting
result variables to ebx. This was causing data corruption.

In order to prevent this easiest solution is to list ebx in clobbers
for the assembly.
2018-08-30 12:52:27 +02:00
49041e5611 Fix T56612: crash in Cycles viewport render update, after recent changes.
BVH8 refitting code had a bug.
2018-08-30 12:46:46 +02:00
a1b38a635e Cleanup: license header formatting. 2018-08-30 12:09:47 +02:00
Campbell Barton
76a9752be2 Cleanup: trailing space 2018-08-30 01:05:13 +10:00
ddf8c49736 Fix Cycles CUDA build after recent changes. 2018-08-29 16:35:21 +02:00
a7f5418caa Cleanup: consistent includes. 2018-08-29 16:32:07 +02:00
Sergey Sharybin
b2c707747d CMake: Comply with include path reported by FindOpenGL.cmake
The script clearly states:

  This makes the presumption that you are include al.h like
  #include "al.h"
  and not
  #include <AL/al.h>
  The reason for this is that the latter is not entirely portable.
  Windows/Creative Labs does not by default put their headers in AL/ and
  OS X uses the convention <OpenAL/al.h>.

This commit makes default precompiled OpenAL to be properly detected
and also removes hack on MacOS which was finding the OpenAL package but
then was overwriting include directory.

Note, that new audaspace in 2.8 is using expected #include <al.h>.
2018-08-29 15:08:28 +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
Ray Molenkamp
5e8a030a08 cmake: adjustments required for lib-upgrade on windows. 2018-08-27 19:38:31 -06:00
Colby Klein
31c99c0c4e Fix pen tablet stuck on Windows for some non-Wacom tablets.
Differential Revision: https://developer.blender.org/D3573
2018-08-26 23:19:31 +02:00
Campbell Barton
03fd1da3ee Cleanup: trailing space 2018-08-26 20:20:35 +10: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
Lukas Stockner
60a5ba265c Cycles: Add Denoising Clean to the debugging denoising passes 2018-08-25 09:32:29 -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
Sergey Sharybin
e92e90c30e Cycles: Fix wrong looking voronoi of second 2nd closest
Was only happening for release builds made with GCC-8. Probably some
optimization strtegy was confused by uninitialized variable.
2018-08-24 12:29:13 +02:00
Lukas Stockner
b3ac3d13a2 Cycles: Add option for building CUDA kernels sequentially
Building the CUDA kernels takes quite a bit of memory, and when building all of
them the combined usage can be too much on some systems (especially VMs).

Therefore, this patch adds an option to force the build system to build them
sequentially by making each build step depend on the previous kernel.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D3623
2018-08-22 19:54:59 -07:00
7ffcce8607 Fix Cycles AO pass not working for shadow catcher objects. 2018-08-20 16:09:17 +02:00
Stefan Werner
a9700e7ad2 Fix T56359: Unitialized variable in Cycles OpenCL could cause crashes. 2018-08-14 22:51:53 +02:00