Commit Graph

7003 Commits

Author SHA1 Message Date
660e8e59e7 Fix T52645, T52645: AMD OpenCL compiler crash with recent drivers.
Work around the bug by reshuffling code.
2017-10-04 21:00:46 +02:00
Ray Molenkamp
57d7e5b6ee Fix T42489 and T52936: Loading blend with minimized window results in crash or empty screen on windows.
Reviewed By: @brecht , @sergey

Differential Revision: http://developer.blender.org/D2866
2017-10-04 11:44:22 -06:00
Sergey Sharybin
61d5c5a64f Fix T52981: 2D Curve shapes do not render untill extruded
Regression since 9298c53.
2017-10-03 15:29:39 +05:00
f55735e533 CMake: support CUDA 9 toolkit, and automatically disable sm_2x binaries.
Fermi cards (GTX 4xx and 5xx) are no longer supported with this version, so
we can keep supporting both CUDA 8 and 9 for a while.
2017-10-01 14:14:53 +02:00
9298c53e4c Fix T52943: don't export curves objects with no faces to Cycles.
Also skip any objects with zero ray visibility and meshes with
zero faces.
2017-09-29 14:54:34 +02:00
d2bbd41b4e Fix Cycles OpenCL compiler error after recent changes. 2017-09-29 14:54:10 +02:00
Campbell Barton
5a1954a5cb Drop platform support for Solaris & AIX
These platforms didn't see maintenance in years.
This commit just removes ifdef's & cmake check.
2017-09-29 19:16:34 +10:00
c10ac1bb5c macOS: officially upgrade to 10.9 libraries from lib/darwin.
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861
2017-09-28 20:53:06 +02:00
Kim Christensen
2a36ee16c1 Fix T52574: make Cycles rendered tile counter more clear.
Differential Revision: https://developer.blender.org/D2853
2017-09-28 15:18:53 +02:00
400e6f37b8 Cycles: reduce subsurface stack memory usage.
This is done by storing only a subset of PathRadiance, and by storing
direct light immediately in the main PathRadiance. Saves about 10% of
CUDA stack memory, and simplifies subsurface indirect ray code.
2017-09-28 15:18:43 +02:00
88520dd5b6 Code refactor: simplify CUDA context push/pop.
Makes it possible to call a function like mem_alloc() when the context is
already active. Also fixes some missing pops in case of errors.
2017-09-27 13:43:21 +02:00
Sergey Sharybin
0d4e519b74 OpenVDB: Fix compilation error against OpenVDB 4
One crucial thing here: OpenVDB shoudl be compiled WITHOUT
OPENVDB_ENABLE_3_ABI_COMPATIBLE flag. This is how OpenVDB's Makefile is
configured and it's not really possible to detect this for a compiled library.

If we ever want to support that option, we need to add extra CMake argument and
use old version 3 API everywhere.
2017-09-25 14:44:17 +05:00
Bastien Montagne
1d8aebaa09 Add an 'atomic cas' wrapper for pointers.
Avoids having to repeat obfuscating castings everywhere...
2017-09-25 10:40:50 +02:00
Sergey Sharybin
cb6f07f59e Cycles: Cleanup, indentation 2017-09-25 11:15:54 +05:00
Sergey Sharybin
c0480bc972 Cycles: Fix compilation error of OpenCL megakernel on Apple 2017-09-23 17:07:19 +05:00
Sergey Sharybin
b460b8fb4a Cycles: Fix compilation error of megakernel on NVidia device
It is more readable to explicitly compare to NULL anyway.
2017-09-23 17:03:02 +05:00
Aaron Carlisle
efd5e3c254 Remove quicktime support
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.

I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.

Reviewers: mont29, dfelinto, juicyfruit, brecht

Reviewed By: mont29, brecht

Subscribers: Blendify, brecht

Maniphest Tasks: T52807

Differential Revision: https://developer.blender.org/D2333
2017-09-22 16:40:05 -04:00
07ec0effb6 Code cleanup: simplify kernel side work stealing code. 2017-09-21 22:29:18 +02:00
Stefan Werner
ee30a4381f Added extra "const" to satisfy the strict clang version in Xcode 9 2017-09-20 21:47:45 +02:00
18a353dd24 Fix T52368: Cycles OSL trace() failing on Windows 32 bit. 2017-09-20 19:38:08 +02:00
14223357e5 Fix T52853: harmless Cycles test failure in debug mode. 2017-09-20 19:38:08 +02:00
90d4b823d7 Cycles: use defensive sampling for picking BSDFs and BSSRDFs.
For the first bounce we now give each BSDF or BSSRDF a minimum sample weight,
which helps reduce noise for a typical case where you have a glossy BSDF with
a small weight due to Fresnel, but not necessarily small contribution relative
to a diffuse or transmission BSDF below.

We can probably find a better heuristic that also enables this on further
bounces, for example when looking through a perfect mirror, but I wasn't able
to find a robust one so far.
2017-09-20 19:38:08 +02:00
095a01a73a Cycles: slightly improve BSDF sample stratification for path tracing.
Similar to what we did for area lights previously, this should help
preserve stratification when using multiple BSDFs in theory. Improvements
are not easily noticeable in practice though, because the number of BSDFs
is usually low. Still nice to eliminate one sampling dimension.
2017-09-20 19:38:08 +02:00
b3afc8917c Code cleanup: refactor BSSRDF closure sampling, for next commit. 2017-09-20 19:38:08 +02:00
d029399e6b Code cleanup: remove SOBOL_SKIP hack, seems no longer needed. 2017-09-20 19:38:08 +02:00
d750d182e5 Code cleanup: remove hack to avoid seeing transparent objects in noise.
Previously the Sobol pattern suffered from some correlation issues that
made the outline of objects like a smoke domain visible. This helps
simplify the code and also makes some other optimizations possible.
2017-09-20 19:38:08 +02:00
Sergey Sharybin
3241905f40 Fix T52818: Tangent space calculation is really slow for high-density mesh with degenerated topology
Now we replace O(N^2) computational complexity with O(N) extra memory penalty.
Memory is much cheaper than CPU time. Keep in mind, memory penalty is like
4 megabytes per 1M vertices.
2017-09-19 17:50:09 +05:00
Sergey Sharybin
2dab6f499c Mikkspace: Cleanup, reduce indentation level 2017-09-19 17:50:09 +05:00
Carlo Andreacchio
ab9079f459 Fix Cycles adaptive compile without volumes broken after recent changes.
Differential Revision: https://developer.blender.org/D2847
2017-09-18 12:52:32 +02:00
Hristo Gueorguiev
6798a061b7 Cycles: Fix compilation error with OpenCL split kernel 2017-09-16 12:33:03 +02:00
Sergey Sharybin
7aafa32c09 Fix T51416: Blender Crashes while moving Sliders
The issue here was that removing datablock from main database will poke editors
update, which includes buttons context to free users of texture. Since Cycles
will free datablocks from job thread, it might crash Blender since main thread
might be in the middle of drawing.

Solved by exposing extra arguments to bpy.data.foo.remove() which indicates
whether we want to perform ID user count and interface updates. While scripts
shouldn't be using those normally, this is the only way to allow Cycles to skip
interface update when removing datablock.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D2840
2017-09-14 17:03:40 +05:00
32449e1b21 Code cleanup: store branch factor in PathState. 2017-09-13 15:24:14 +02:00
9e258fc641 Code cleanup: avoid used of uninitialized value in case of precision issue. 2017-09-13 15:24:14 +02:00
37d9e65ddf Code cleanup: abstract shadow catcher logic more into accumulation code. 2017-09-13 15:24:14 +02:00
f77cdd1d59 Code cleanup: deduplicate some branched and split kernel code.
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for
bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-13 15:24:14 +02:00
c4c450045d Code cleanup: tweak inlining for 2% better CUDA performance with hair. 2017-09-13 15:24:14 +02:00
Mathieu Menuet
659ba012b0 Cycles: change AO bounces approximation to do more glossy and transmission.
Rather than treating all ray types equally, we now always render 1 glossy
bounce and unlimited transmission bounces. This makes it possible to get
good looking results with low AO bounces settings, making it useful to
speed up interior renders for example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2818
2017-09-12 15:37:35 +02:00
de6ecc82ed Fix rare firefly in volume equiangular sampling when sampling short distance. 2017-09-12 12:50:44 +02:00
cd6c9e9e5f Cycles: improve sample stratification on area lights for path tracing.
Previously we used a 1D sequence to select a light, and another 2D sequence
to sample a point on the light. For multiple lights this meant each light
would get a random subset of a 2D stratified sequence, which is not
guaranteed to be stratified anymore.

Now we use only a 2D sequence, split into segments along the X axis, one for
each light. The samples that fall within a segment then each are a stratified
sequence, at least in the limit. So for example for two lights, we split up
the unit square into two segments [0,0.5[ x [0,1[ and [0.5,1[ x [0,1[.

This doesn't make much difference in most scenes, mainly helps if you have a
few large area lights or some types of HDR backgrounds.
2017-09-12 12:45:29 +02:00
d454a44e96 Fix Cycles bug in RR termination, probability should never be > 1.0.
This causes render differences in some scenes, for example fishy_cat
and pabellon scenes render brighter in a few spots. This is an old
bug, not due to recent RR changes.
2017-09-12 12:43:26 +02:00
Sergey Sharybin
467d92b8f1 Cycles: Tweaks to avoid compilation error of megakernel
Also moved code out of deep-inside ifdef block, otherwise it was quite confusing.
2017-09-12 13:33:46 +05:00
Sergey Sharybin
ae41a08288 Cycles: Attempt to work around compilation of sm_20 and sm_21
Disabled forceinline for those architectures, which seems to be compiling
successfully more often.

There might be ~3% slowdown based on quick tests, but better be rendering
something rather than failing to compile kernels again and again.

Those architectures will be doomed for abandon once we'll switch to toolkit 9.
2017-09-08 18:37:54 +02:00
ce1f2e271d Cycles: disable fast math flags, only use a subset.
Empty BVH nodes are set to NaN which must be preserved all the way to the
tnear <= tfar test which can then give false for empty nodes. This needs
strict semantices and careful argument ordering for min() and max(), so
the second argument is used if either of the arguments is NaN.

Fixes T52635: crash in BVH traversal with SSE4.1.

Differential Revision: https://developer.blender.org/D2828
2017-09-08 15:12:37 +02:00
c10ea88420 Fix T52660: CUDA volume texture rendering not working on Fermi GPUs. 2017-09-06 18:12:45 +02:00
2d407fc288 Fix T52661: mesh light shader using backfacing not working, after new sampling. 2017-09-06 13:51:48 +02:00
dd8016f708 Fix T52652: Cycles image box mapping has flipped textures.
This breaks backwards compatibility some in that 3 sides will be mapped
differently now, but difficult to avoid and can be considered a bugfix.
2017-09-06 13:51:45 +02:00
Sergey Sharybin
750e38a526 Cycles: Fix compilation error with CUDA after recent changes 2017-09-05 16:52:45 +02:00
Sergey Sharybin
f01e43fac3 Fix T52433: Volume Absorption color tint
Need to exit the volume stack when shadow ray laves the medium.

Thanks Brecht for review and help in troubleshooting!
2017-09-05 15:48:34 +02:00
Sergey Sharybin
b0bbb5f34f Cycles: Cleanup, style 2017-09-05 12:43:02 +02:00
Sergey Sharybin
885c0a5f90 Cycles: Fix compilation warning 2017-09-04 13:28:15 +02:00