5 months agoFix crash activating a fullscreened screen
Julian Eisel [Sat, 4 May 2019 13:12:55 +0000 (15:12 +0200)]
Fix crash activating a fullscreened screen

Steps to reproduce were:
* Duplicate some area into new window (shift-click corner triangle)
* Make it fullscreen
* Close the window again
* Activate the added screen from the menu (the one without the
  -nonnormal prefix)
-> Crash (you may have to press "Back to Previous" first though)

When activating a screen, code should check if there's a fullscreen
variant of it and activate that instead. From what I can tell that's
what the code tried to do, but incorrectly.

Same issue as T64045, but things are a bit different for 2.7.

5 months agoFix for Cycles UV adaptive subdivision after float2 changes.
Alex Fuller [Thu, 25 Apr 2019 12:04:31 +0000 (14:04 +0200)]
Fix for Cycles UV adaptive subdivision after float2 changes.

Differential Revision:

5 months agoFix T63796: Cycles OSL shader with closure not working in final render.
Brecht Van Lommel [Tue, 16 Apr 2019 01:03:24 +0000 (03:03 +0200)]
Fix T63796: Cycles OSL shader with closure not working in final render.

5 months agoFix T62408: Cycles viewport adaptive subdivision hangs after updates
Brecht Van Lommel [Thu, 4 Apr 2019 18:06:22 +0000 (20:06 +0200)]
Fix T62408: Cycles viewport adaptive subdivision hangs after updates

Backporting fix from the master branch.

5 months agoBuildbot: Attempt to fix wrong branch in buildinfo
Sergey Sharybin [Wed, 10 Apr 2019 13:46:47 +0000 (15:46 +0200)]
Buildbot: Attempt to fix wrong branch in buildinfo

For some reason the buildinfo header was not re-generated. The root
reason is not really clear to me, so simply remove the header similar
to the CMake cache.

6 months agoFix: Build error with msvc.
Ray Molenkamp [Tue, 9 Apr 2019 16:45:39 +0000 (10:45 -0600)]
Fix: Build error with msvc.

Unused label spawned a warn but bmesh builds with warns as errors.

6 months agoFix for GCC9 new OpenMP data sharing
Robert-André Mauchin [Tue, 2 Apr 2019 23:36:52 +0000 (01:36 +0200)]
Fix for GCC9 new OpenMP data sharing

GCC 9 started implementing the OpenMP 4.0 and later behavior. When not using
default clause or when using default(shared), this makes no difference, but
if using default(none), previously the choice was not specify the const
qualified variables on the construct at all, or specify in firstprivate
clause. In GCC 9 as well as for OpenMP 4.0 compliance, those variables need
to be specified on constructs in which they are used, either in shared or
in firstprivate clause. Specifying them in firstprivate clause is one way to
achieve compatibility with both older GCC versions and GCC 9,
another option is to drop the default(none) clause.

This patch thus drops the default(none) clause.


Signed-off-by: Robert-André Mauchin <>
6 months agoFix build error with Visual Studio, appears to be a compiler bug
Brecht Van Lommel [Sun, 7 Apr 2019 00:38:03 +0000 (02:38 +0200)]
Fix build error with Visual Studio, appears to be a compiler bug

It's not clear that "if (0 &&" was introduced intentionally, but this test
only seems to have been an insignificant optimization anyway.

Fixes T63329

6 months agoConstraints: Use RNA update instead of block update
Sergey Sharybin [Tue, 2 Apr 2019 15:44:18 +0000 (17:44 +0200)]
Constraints: Use RNA update instead of block update

Allows to have more control over which tags are done for which

This is a part of T62960 which fixes the issue in the 2.7 series.

6 months agoConstraints: Mark proxy lcoal as not editable
Sergey Sharybin [Tue, 2 Apr 2019 15:43:33 +0000 (17:43 +0200)]
Constraints: Mark proxy lcoal as not editable

This can not work reliably anyway.

6 months agoCleanup: Remove space at the end of description
Sergey Sharybin [Tue, 2 Apr 2019 15:42:30 +0000 (17:42 +0200)]
Cleanup: Remove space at the end of description

6 months agoBuild environment: update comment about required packages.
Brecht Van Lommel [Thu, 28 Mar 2019 23:39:19 +0000 (00:39 +0100)]
Build environment: update comment about required packages.

6 months agoCycles: sync various master changes to blender2.7.
Brecht Van Lommel [Tue, 26 Mar 2019 13:34:18 +0000 (14:34 +0100)]
Cycles: sync various master changes to blender2.7.

Many of these were left out accidentally. We will only do important bugfixes
in blender2.7 for Cycles from this point on.

6 months agoChange remaining FTP server URIs to HTTP(s)
Stephen Hassard [Mon, 25 Mar 2019 10:14:07 +0000 (11:14 +0100)]
Change remaining FTP server URIs to HTTP(s)

Most of the source tarballs are retrieved via http, but a few remain
that are still downloaded via ftp. This causes some pain with corporate
firewalls, so moving the last two URIs to http helps ease the build process.

Reviewers: sergey

Differential Revision:

6 months agoInclude blosc, embree and opencollada into BUILD_NOTES.txt file.
Bastien Montagne [Mon, 25 Mar 2019 10:03:52 +0000 (11:03 +0100)]
Include blosc, embree and opencollada into BUILD_NOTES.txt file.

For custom path selected during '' using '--source'/'--install', paths for blosc, embree and opencollada are not printed/inclued into BUILD_NOTES.txt file.
As '/opt/lib/<package>' paths are hardcoded into CMakes's Find* modules, this error is not noticeable, but for custom paths it is.
This patch includes those fixes/prints for those packages.

Reviewers: mont29

Reviewed By: mont29

Differential Revision:

6 months agoFix T62175: Crash on Undo.
Bastien Montagne [Mon, 4 Mar 2019 15:44:33 +0000 (16:44 +0100)]
Fix T62175: Crash on Undo.

Again nodetree broken code... as usual...

6 months agoMSVC: add C4115 and C4189 warnings.
mano-wii [Fri, 22 Mar 2019 19:15:46 +0000 (16:15 -0300)]
MSVC: add C4115 and C4189 warnings.

This matches the warnings of the other compilers commonly used in Blender.

6 months agoRevert "Cleanup: remove legacy mesh save support"
Brecht Van Lommel [Fri, 22 Mar 2019 17:16:46 +0000 (18:16 +0100)]
Revert "Cleanup: remove legacy mesh save support"

Fixes T62793. Leave this in the blender2.7 branch for those that still rely
on it, but it will remain removed in master.

6 months agoFix T62844: Cycles crash with bevel and degenerate geometry.
Brecht Van Lommel [Fri, 22 Mar 2019 16:01:33 +0000 (17:01 +0100)]
Fix T62844: Cycles crash with bevel and degenerate geometry.

6 months agoFix cycles.merge_images not merging correctly for some channel layouts.
Brecht Van Lommel [Wed, 20 Mar 2019 17:38:02 +0000 (18:38 +0100)]
Fix cycles.merge_images not merging correctly for some channel layouts.

6 months agoCycles: make cycles.merge_images work with incomplete layers and passes.
Brecht Van Lommel [Wed, 20 Mar 2019 15:02:38 +0000 (16:02 +0100)]
Cycles: make cycles.merge_images work with incomplete layers and passes.

If layers and passes are not exactly the same in all files, we make a best
effort to merge them instead of failing.

6 months agoFix T62758: hair curves with UV mapped textures renders wrong.
Jacques Lucke [Wed, 20 Mar 2019 15:59:49 +0000 (16:59 +0100)]
Fix T62758: hair curves with UV mapped textures renders wrong.

Differential Revision:

6 months agoCycles: Made Embree ignore curve intersections with SSS.
Stefan Werner [Wed, 20 Mar 2019 11:27:35 +0000 (12:27 +0100)]
Cycles: Made Embree ignore curve intersections with SSS.

6 months agoCycles: Performance optimization for Embree, resizing arrays once instead of per...
Stefan Werner [Wed, 20 Mar 2019 09:48:49 +0000 (10:48 +0100)]
Cycles: Performance optimization for Embree, resizing arrays once instead of per object.

6 months agoCleanup: fix debug warnign due to tooltip ending in dot.
Brecht Van Lommel [Tue, 19 Mar 2019 18:16:39 +0000 (19:16 +0100)]
Cleanup: fix debug warnign due to tooltip ending in dot.

6 months agoCycles: add cycles.merge_images operator for combing EXR renders.
Brecht Van Lommel [Tue, 19 Mar 2019 13:38:57 +0000 (14:38 +0100)]
Cycles: add cycles.merge_images operator for combing EXR renders.

This is only available through the API, mainly intended for render farms to
combine rendered multilayer EXR Files with different samples. The images are
currently expected to have the exact same render layers and passes, just with
different samples.

Variance passes are still simply a weighted average, ideally these should be
merged more intelligently.

Differential Revision:

6 months agoCycles: Implement function to format and parse human readable time
Sergey Sharybin [Tue, 19 Mar 2019 14:19:22 +0000 (15:19 +0100)]
Cycles: Implement function to format and parse human readable time

Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.

6 months agoFix Cycles curve UVs wrong after recent changes.
Brecht Van Lommel [Mon, 18 Mar 2019 17:51:24 +0000 (18:51 +0100)]
Fix Cycles curve UVs wrong after recent changes.

6 months agoFix T62712: Cycles world light path node not working.
Brecht Van Lommel [Mon, 18 Mar 2019 17:45:17 +0000 (18:45 +0100)]
Fix T62712: Cycles world light path node not working.

6 months agoFix AMD OpenCL build error after recent changes.
Brecht Van Lommel [Mon, 18 Mar 2019 15:36:55 +0000 (16:36 +0100)]
Fix AMD OpenCL build error after recent changes.

Always use native function since this was already the case due to
__CL_USE_NATIVE__ not being defined in time, and seems to have caused no
known issues.

7 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Mon, 18 Mar 2019 13:56:08 +0000 (14:56 +0100)]
Cleanup: fix compiler warnings.

7 months agoCycles: Cleanup strict compiler warnings
Sergey Sharybin [Mon, 18 Mar 2019 11:02:41 +0000 (12:02 +0100)]
Cycles: Cleanup strict compiler warnings

7 months agoCleanup: remove unused buildbot code.
Brecht Van Lommel [Sun, 17 Mar 2019 02:02:00 +0000 (03:02 +0100)]
Cleanup: remove unused buildbot code.

7 months agoFix Windows 32bit buildbot trying to use CUDA, should be disabled.
Brecht Van Lommel [Sun, 17 Mar 2019 01:56:22 +0000 (02:56 +0100)]
Fix Windows 32bit buildbot trying to use CUDA, should be disabled.

7 months agoCycles: optimization for constant background colors.
Brecht Van Lommel [Tue, 19 Feb 2019 16:44:58 +0000 (17:44 +0100)]
Cycles: optimization for constant background colors.

Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.

7 months agoFix Cycles OpenCL compile waiting unnecessarily for background shader.
Brecht Van Lommel [Sun, 17 Mar 2019 00:56:08 +0000 (01:56 +0100)]
Fix Cycles OpenCL compile waiting unnecessarily for background shader.

Makes preview kernel appear quicker when background color is fixed.

7 months agoCleanup: simplify kernel features definition.
Brecht Van Lommel [Sat, 16 Mar 2019 15:45:50 +0000 (16:45 +0100)]
Cleanup: simplify kernel features definition.

No functional changes, logic here got too complex after many changes over
the years.

7 months agoCleanup: remove Cycles advanced shading features toggle.
Brecht Van Lommel [Sat, 16 Mar 2019 15:06:36 +0000 (16:06 +0100)]
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.

7 months agoTests: remove unnecessary _test postfix on test names.
Brecht Van Lommel [Fri, 15 Mar 2019 18:11:33 +0000 (19:11 +0100)]
Tests: remove unnecessary _test postfix on test names.

7 months agoCycles: upgrade to CUDA 10.1 as the one officially supported version.
Brecht Van Lommel [Fri, 15 Mar 2019 13:18:22 +0000 (14:18 +0100)]
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.

7 months agoFix cycles preferences.get_devices() not returning all devices as before.
Brecht Van Lommel [Fri, 15 Mar 2019 14:26:18 +0000 (15:26 +0100)]
Fix cycles preferences.get_devices() not returning all devices as before.

It only returned those for the active device type. For backwards compatibility
return them all again, but still avoid enumerating them from our own code on
startup or opening preferences.

7 months agoCycles/OpenCL: Compile Kernels During Scene Update
Jeroen Bakker [Wed, 13 Mar 2019 11:31:48 +0000 (12:31 +0100)]
Cycles/OpenCL: Compile Kernels During Scene Update

The main goals of this change is faster starting when using foreground

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:

7 months agoCycles/OpenCL: Added missing opencl programs
Jeroen Bakker [Fri, 15 Mar 2019 07:11:28 +0000 (08:11 +0100)]
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.

7 months agoFix T62120: number button editing outside of soft max range jumps.
Brecht Van Lommel [Thu, 14 Mar 2019 17:27:17 +0000 (18:27 +0100)]
Fix T62120: number button editing outside of soft max range jumps.

7 months agoFix T57138: Cycles CMJ failing with viewport samples set to 0.
Brecht Van Lommel [Thu, 14 Mar 2019 16:29:18 +0000 (17:29 +0100)]
Fix T57138: Cycles CMJ failing with viewport samples set to 0.

Can't use INT_MAX, CMJ runs into precision/overflow issues before that.

7 months agoCycles: Improved thread order for better CUDA performance.
Stefan Werner [Thu, 14 Mar 2019 10:45:58 +0000 (11:45 +0100)]
Cycles: Improved thread order for better CUDA performance.

This patch puts threads that render the same pixel closer together,
as opposed to threads that render the same sample. Thus threads
within a warp are more coherent in memory access and control flow,
leading to performance improvements.

Example benchmarks on a Quadro RTX4000 (WDDM) on Windows 10:
Koro:                 4:23 ->  3:46
BMW:                  1:18 ->  1:25
Barbershop Interior: 17:52 -> 14:55
Classroom:            4:37 ->  3:45

Performance differences on OpenCL/AMD were hit and miss, some scenes
became faster, others lost significantly. Therefore, this is kept as
CUDA only change for now.

7 months agoFix T62145: Geometry.Backface Node Renders Black
Jeroen Bakker [Thu, 14 Mar 2019 08:20:11 +0000 (09:20 +0100)]
Fix T62145: Geometry.Backface Node Renders Black

The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is

7 months agoBuild environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Brecht Van Lommel [Wed, 13 Mar 2019 12:00:03 +0000 (13:00 +0100)]
Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.

Otherwise we can silently build an OpenAL that can't actually playback audio.

7 months agoFix T60434: crash with OSL and viewport + preview render at the same time.
Brecht Van Lommel [Wed, 13 Mar 2019 17:26:11 +0000 (18:26 +0100)]
Fix T60434: crash with OSL and viewport + preview render at the same time.

Don't free LLVM JIT memory until process exit, there might be multiple OSL
instances using it.

7 months agoBuild environment: backport master changes to blender2.7.
Brecht Van Lommel [Wed, 13 Mar 2019 17:30:42 +0000 (18:30 +0100)]
Build environment: backport master changes to blender2.7.

We can keep these in sync for now.

7 months agoBuild environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.
Brecht Van Lommel [Wed, 13 Mar 2019 12:00:03 +0000 (13:00 +0100)]
Build environment: require Alsa/OSS/PulseAudio backends for OpenAL on Linux.

Otherwise we can silently build an OpenAL that can't actually playback audio.

7 months agoFix T62481: Cycles crash rendering with UV pass after recent changes.
Brecht Van Lommel [Tue, 12 Mar 2019 13:03:05 +0000 (14:03 +0100)]
Fix T62481: Cycles crash rendering with UV pass after recent changes.

7 months agoCycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
Jeroen Bakker [Tue, 12 Mar 2019 12:58:39 +0000 (13:58 +0100)]
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:

7 months agoFix T61053: crash baking to float image after file save.
Brecht Van Lommel [Mon, 11 Mar 2019 10:09:14 +0000 (11:09 +0100)]
Fix T61053: crash baking to float image after file save.

This is the wrong flag to check, no other code actually reads it.

7 months agoFix T61103: Cycles bevel wrong on objects with negative scale.
Brecht Van Lommel [Mon, 11 Mar 2019 09:20:31 +0000 (10:20 +0100)]
Fix T61103: Cycles bevel wrong on objects with negative scale.

7 months agoFix T61831: Denoising Clean pass not scaled correctly with samples.
Brecht Van Lommel [Mon, 11 Mar 2019 08:13:46 +0000 (09:13 +0100)]
Fix T61831: Denoising Clean pass not scaled correctly with samples.

7 months agoColor management: Fix/workaround broken getDefaultDisplay()
Sergey Sharybin [Wed, 5 Dec 2018 12:34:04 +0000 (13:34 +0100)]
Color management: Fix/workaround broken getDefaultDisplay()

This is something what is caused by OCIO library. The patch
has been submitted there:

For until it is refined and checked we do workaround from
our side.

7 months agoColor management: Query default view from display
Sergey Sharybin [Wed, 5 Dec 2018 11:06:48 +0000 (12:06 +0100)]
Color management: Query default view from display

Solves weird situation when default display name is queried
from OCIO, but Default view being assumed to be set for it.

Now view is initialized to a default view of that display.

7 months agoFix stashed full-screens returning to wrong layout
Julian Eisel [Sat, 9 Mar 2019 15:58:13 +0000 (16:58 +0100)]
Fix stashed full-screens returning to wrong layout

Steps to reproduce were:
* Maximize area (Shift+Spacebar in 2.7, Ctrl+Spacebar in 2.8)
* Open temp file browser (Ctrl+O)
* Cancel file browser (Esc) - should return to previous full-screen
* Press "Return to Previous" button
The previously maximized area would turn into a file-browser.

Note that the issue will still happen when opening old files saved while
in maximized area full-screen.

7 months agoCycles OpenCL: Remove single program
Jeroen Bakker [Fri, 8 Mar 2019 15:31:05 +0000 (16:31 +0100)]
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:

7 months agocmake/windows: Set LLVM_INCLUDE_DIRS variable.
Ray Molenkamp [Fri, 8 Mar 2019 14:17:56 +0000 (07:17 -0700)]
cmake/windows: Set LLVM_INCLUDE_DIRS variable.

7 months agobuild_environment/Windows: Copy llvm debug headers.
Ray Molenkamp [Fri, 8 Mar 2019 13:59:54 +0000 (06:59 -0700)]
build_environment/Windows: Copy llvm debug headers.

llvm generates some header files at build time that differ between
debug/release causing linker errors when you used the release headers
for a debug build.

7 months agoCodestyle: comments
Jeroen Bakker [Fri, 8 Mar 2019 07:56:16 +0000 (08:56 +0100)]
Codestyle: comments

7 months agoFix Cycles build error on non-x86 processors.
Brecht Van Lommel [Wed, 6 Mar 2019 12:27:29 +0000 (13:27 +0100)]
Fix Cycles build error on non-x86 processors.

7 months agoCleanup: add asserts to catch cases where wrong attribute type is used.
Brecht Van Lommel [Tue, 5 Mar 2019 17:49:47 +0000 (18:49 +0100)]
Cleanup: add asserts to catch cases where wrong attribute type is used.

7 months agoFix Cycles bug rendering with multiple UV maps after recent changes.
Brecht Van Lommel [Tue, 5 Mar 2019 17:39:55 +0000 (18:39 +0100)]
Fix Cycles bug rendering with multiple UV maps after recent changes.

7 months agoCycles: Changed standalone XML parser to read UV as float2
Stefan Werner [Tue, 5 Mar 2019 14:25:36 +0000 (15:25 +0100)]
Cycles: Changed standalone XML parser to read UV as float2

7 months agoCycles: Added Float2 attribute type.
Brecht Van Lommel [Tue, 5 Mar 2019 13:54:54 +0000 (14:54 +0100)]
Cycles: Added Float2 attribute type.

Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

Differential Revision:

7 months agoFix T58953: Lamp data not always set
Jeroen Bakker [Tue, 5 Mar 2019 13:22:54 +0000 (14:22 +0100)]
Fix T58953: Lamp data not always set

The Lamp data was not always set. When using CUDA or CPU it was, but when using OpenCL
without `OBJECT_MOTION` `sd->lamp` not updated to the actual lamp. This made the
TextureCoordinate output the wrong normal when used in a light shader.

As the normal was incorrect it made the IES node render incorrectly.
(what is the default for the IES node).

By setting the lamp data when no `__OBJECT_MOTION__` compile directive is present makes
sure that the normal is correctly calculated.

Fix D4450

Reviewed By: Brecht van Lommel

7 months agoFixup for fix for OSX build using a build folder name with spaces
Dalai Felinto [Fri, 1 Mar 2019 20:07:06 +0000 (17:07 -0300)]
Fixup for fix for OSX build using a build folder name with spaces

Bug introduced on: 1f22e3f311e74031c3c01714117d759d3e3de3f1.
This was making regular Mac builds to fail, where they were not failing before.

Tested by William Reynish.

7 months agoFix missing image editor redraw when reloading image through API.
Brecht Van Lommel [Mon, 4 Mar 2019 15:04:24 +0000 (16:04 +0100)]
Fix missing image editor redraw when reloading image through API.

7 months agoFix Cycles animation denoising giving black pixels for some outliers.
Brecht Van Lommel [Mon, 4 Mar 2019 15:01:11 +0000 (16:01 +0100)]
Fix Cycles animation denoising giving black pixels for some outliers.

The denoising code expects the output buffer to be filled with the noisy
image, which was not the case for standalone denoising.

7 months agoFix bad level calls
Sergey Sharybin [Mon, 4 Mar 2019 10:58:37 +0000 (11:58 +0100)]
Fix bad level calls

7 months agoFix T62073: Cycles random hangs rendering with Save Buffers on.
Brecht Van Lommel [Fri, 1 Mar 2019 18:09:17 +0000 (19:09 +0100)]
Fix T62073: Cycles random hangs rendering with Save Buffers on.

7 months agoFix macOS OpenMP build error when using a build folder name with spaces.
Brecht Van Lommel [Thu, 28 Feb 2019 23:25:53 +0000 (00:25 +0100)]
Fix macOS OpenMP build error when using a build folder name with spaces.

Patch by Campbell.

7 months agoFix Cycles animation denoising not working for files on a network drive.
Brecht Van Lommel [Thu, 28 Feb 2019 18:15:40 +0000 (19:15 +0100)]
Fix Cycles animation denoising not working for files on a network drive.

Can't do cross-device renaming, so put temporary file in same folder as
output file.

7 months agoCleanup: prevent future issues with ID.tag overflow, clarify somes names.
Brecht Van Lommel [Tue, 26 Feb 2019 13:14:56 +0000 (14:14 +0100)]
Cleanup: prevent future issues with ID.tag overflow, clarify somes names.

7 months agoCleanup: remove unnecessary assert.
Brecht Van Lommel [Tue, 26 Feb 2019 18:59:51 +0000 (19:59 +0100)]
Cleanup: remove unnecessary assert.

7 months agoCycles: Fix build error
Ray Molenkamp [Tue, 26 Feb 2019 15:32:41 +0000 (08:32 -0700)]
Cycles: Fix build error

introduced by rBdabe5cd31add8aa55b9ad4bce1b591ed4e98f1a1

7 months agoT61971: Compilation Displacement/Background Kernel
Jeroen Bakker [Tue, 26 Feb 2019 13:05:54 +0000 (14:05 +0100)]
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:

7 months agoT61576: Do Not (Re-)Compile OpenCL kernels
Jeroen Bakker [Tue, 26 Feb 2019 07:53:47 +0000 (08:53 +0100)]
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

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

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:

7 months agoFix T61946: Cycles border render missing samples and crypto metadata.
Brecht Van Lommel [Mon, 25 Feb 2019 18:51:36 +0000 (19:51 +0100)]
Fix T61946: Cycles border render missing samples and crypto metadata.

7 months agoFix T61891: Cycles light use nodes button greyed out.
Brecht Van Lommel [Mon, 25 Feb 2019 09:24:40 +0000 (10:24 +0100)]
Fix T61891: Cycles light use nodes button greyed out.

7 months agomake.bat: Preliminary Visual Studio 2019 support.
Ray Molenkamp [Sat, 23 Feb 2019 03:49:22 +0000 (20:49 -0700)]
make.bat: Preliminary Visual Studio 2019 support.

VS2019 is binary compatible with the existing vc14 libraries and no
new libraries libs are required in svn.

VS2019 support requires cmake 3.14.

VS2019 is still in pre-release state, you are required to explicitly
select the pre-release version by using:

make full 2019pre

7 months agoMake.bat: Fix sub-module detection
Ray Molenkamp [Sat, 23 Feb 2019 03:02:45 +0000 (20:02 -0700)]
Make.bat: Fix sub-module detection

7 months agoFix previous commit
Sergey Sharybin [Fri, 22 Feb 2019 14:52:42 +0000 (15:52 +0100)]
Fix previous commit

Somehow quote got missing the last moment.

7 months agoAlways show version when running in background mode
Sergey Sharybin [Fri, 22 Feb 2019 14:47:54 +0000 (15:47 +0100)]
Always show version when running in background mode

The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.

7 months agoWindows: Use static pthreads library.
Ray Molenkamp [Thu, 21 Feb 2019 21:16:26 +0000 (14:16 -0700)]
Windows: Use static pthreads library.

7 months agoFix T61810: Cycles OpenCL denoising broken after recent changes.
Brecht Van Lommel [Thu, 21 Feb 2019 15:46:42 +0000 (16:46 +0100)]
Fix T61810: Cycles OpenCL denoising broken after recent changes.

7 months agoCycles OpenCL: Motion Blur Compile Directives
Jeroen Bakker [Thu, 21 Feb 2019 12:31:52 +0000 (13:31 +0100)]
Cycles OpenCL: Motion Blur Compile Directives

When using preview rendering through a camera or final rendering
the `scene.render.use_motion_blur` was not respected when building
the compile directives.

This patch will when building the compile directives check if
motion blur is enabled at all. This should lead to more efficient
kernels when no motion blur is needed.

Tags: #cycles

Differential Revision:

7 months agoFix T61802: EXR preview JPEGs don't have the correct color
Sergey Sharybin [Thu, 21 Feb 2019 14:29:02 +0000 (15:29 +0100)]
Fix T61802: EXR preview JPEGs don't have the correct color

Missing color management, probably from the very beginnings of
the OCIO integration.

7 months agoFix: Missing closing brackets in include
Jeroen Bakker [Thu, 21 Feb 2019 13:36:51 +0000 (14:36 +0100)]
Fix: Missing closing brackets in include

7 months agoFix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.
John Quillan [Thu, 21 Feb 2019 12:26:22 +0000 (13:26 +0100)]
Fix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.

It was copying the alpha from the foreground instead of background image,
which is not usually what is needed and inconsistent with the compositor.

Differential Revision:

7 months agoCodestyle: Indentation
Jeroen Bakker [Thu, 21 Feb 2019 07:52:04 +0000 (08:52 +0100)]
Codestyle: Indentation

7 months agoFix: OpenCL Displacement and light sampling
Jeroen Bakker [Thu, 21 Feb 2019 07:11:02 +0000 (08:11 +0100)]
Fix: OpenCL Displacement and light sampling

The bake kernels are also used during mesh displacement and light
importance sampling. We disabled the implementation of these kernels
when baking was not enabled.

7 months agoCycles: Fix uninitialized number of hits
Sergey Sharybin [Wed, 20 Feb 2019 22:15:21 +0000 (23:15 +0100)]
Cycles: Fix uninitialized number of hits

Was happening when looking for all intersections for transparent shadow rays
in the case the ray is degenerate.

Still quesitonable whether we should consider this a transparent or opaque
configuraiton. Ideally, we should prevent such rays from happening, but that
is another vector of debugging.

7 months agoTests: only run OpenGL draw tests on lib/tests/opengl, support symlinks.
Brecht Van Lommel [Wed, 20 Feb 2019 15:03:13 +0000 (16:03 +0100)]
Tests: only run OpenGL draw tests on lib/tests/opengl, support symlinks.

To keep running these tests relatively fast and practical to run often,
running it on all .blend files is a bit much. So now we only run it on
files from this directory.

Additionally this adds supports for following symlinks, so that you can
easily symlinks to other directories if you want to tests extra files
which may have linked libraries.

7 months agoCleanup: fix compiler warning.
Brecht Van Lommel [Wed, 20 Feb 2019 15:32:06 +0000 (16:32 +0100)]
Cleanup: fix compiler warning.

7 months agoCycles OpenCL: Remove OpenCL MegaKernel
Jeroen Bakker [Wed, 20 Feb 2019 13:41:56 +0000 (14:41 +0100)]
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:

7 months agoT61463: Separate Baking kernels
Jeroen Bakker [Tue, 19 Feb 2019 15:31:31 +0000 (16:31 +0100)]
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: