Commit Graph

5603 Commits

Author SHA1 Message Date
Sergey Sharybin
e2161ca854 Cycles: Remove few function arguments needed only for the split kernel
Use KernelGlobals to access all the global arrays for the intermediate
storage instead of passing all this storage things explicitly.

Tested here with Intel OpenCL, NVIDIA GTX580 and AMD Fiji, didn't see
any artifacts, so guess it's all good.

Reviewers: juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1736
2016-01-28 18:59:27 +01:00
Sergey Sharybin
5f31089957 Cycles: Make OpenCL's argument wrapper able to get int/float values directly 2016-01-28 15:03:42 +01:00
Bastien Montagne
12c71508c2 Fix T47228: Ghost not handling predictably keycodes when first keymap is non-latin.
Why this is not working in original code and works int this one remains mystery
(see comments for details).

Note that we still do not support at all non-latin keymaps for our shortcuts,
this would be nice to add someday, but that's a TODO, not a bug.

Reviewers: sergey, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1746
2016-01-28 14:57:33 +01:00
Sergey Sharybin
ff0dcc5d70 Cycles: Make kernel compilable for 3.7 compute capability
It is used by GK210 GPUs which could be found in, i.e. Tesla K80.
2016-01-28 11:56:09 +01:00
Sergey Sharybin
efefae62de Atomics: Use _InterlockedAnd8 direction for 342bit MSVC
That's what MSDN tells you to do and that's how to solve the compilation
error problem with it.
2016-01-27 14:16:02 +01:00
Sergey Sharybin
1f954649c4 OpenVDB: Get rid of hardcoded TBB variables and enabled for Linux buildbot 2016-01-27 12:27:35 +01:00
Bastien Montagne
7e9103b49c atomic_ops: add atomic_fetch_and_and_uint8 wrapper.
Needed by incomming changes in pbvh.c.

Note that we make it much simpler than for other primitives in this file - think
we could revise its content to make it simpler one day...
2016-01-27 12:26:00 +01:00
Sergey Sharybin
8126b0222d Fix T47214: Keyed Particles don't render correctly when used for point density input
The issue was caused by different AABB used by Cycles and texture sampler.

Instead of trying to keep this two functions in sync we now do have an
utility call in the point density node to query the AABB.
2016-01-26 12:50:55 +01:00
Sergey Sharybin
c8d2ebe13c Compositor: Speedup movie (un)distortion operation
Avoid per-pixel camera intrincs object construction and synchronization.

Here on a bit synthetic file it gives about 40% speedup with a single node.
2016-01-26 11:44:43 +01:00
Thomas Dinges
780e900a0d Cycles: Tweak Cycles samples again.
Now we use 128 for final, and 32 for preview. These values should be a bit
better (power of two, also faster with CMJ).
2016-01-24 13:32:20 +01:00
Sergey Sharybin
9163fc05a7 Cycles: Fix typo in flags check 2016-01-24 17:05:02 +05:00
Thomas Dinges
35c3e7b522 Cleanup: Remove outdated comment in volume code.
Thanks to jesterking for finding this one.
2016-01-24 12:31:36 +01:00
Campbell Barton
3174254142 Cleanup: style 2016-01-24 12:13:37 +11:00
Sergey Sharybin
b42878012c Cycles: Make Clang 3.6 happy with const debug flags reference
For some reason it did not like the explicit const qualifier for a
custom type.
2016-01-24 01:33:53 +05:00
Kévin Dietrich
e9452f909c Implementation of OpenVDB as a possible cache format for smoke
simulations.

This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.

A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.

A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB

Reviewers: sergey, lukastoenne, brecht, campbellbarton

Reviewed By: brecht, campbellbarton

Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht

Differential Revision: https://developer.blender.org/D1721
2016-01-23 08:39:40 +01:00
Thomas Dinges
456e7be9d2 Cycles: Change several default values (first batch).
This changes the following defaults:

- Render settings:

  * Samples: 100
  * Preview Samples: 50
  * Filter: Blackmann-Harris
  * Tile Order: Hilbert Spiral

- Lamp settings:

  * Use MIS: On

- Material settings:

  * Volume Sampling: Multiple Importance

Old files are not affected, I tested the versioning code back and forth.
More changes are to come (World, BVH...) but that needs a bit more work.
2016-01-22 23:19:23 +01:00
Martijn Berger
7788681eda MS Visual Studio 2015 does not find std::inserter 2016-01-21 17:21:32 +01:00
Thomas Dinges
adcef2bd36 Cycles: Improve UI feedback for light samples.
Fix T47213.
There was actually no real bug here, just clarify now in the UI that Mesh, World and Lamp samples only have an effect if we sample all lights (direct or indirect).
2016-01-21 09:02:49 +01:00
Bastien Montagne
54d3506253 Fix error in rBa6eae7339190. 2016-01-20 14:54:57 +01:00
Sergey Sharybin
a6eae73391 Fix (partial) T47198: Cycles have broken UVs in some degenerated quads cases
The issue was discontinuity in logic when importing vertices from blender
and then importing data layers regardless of how we split the face. Quite
interesting we didn't notice this issue before.

Thanks Bastien for the investigation, based on D1742 but redid it to make
patch a bit more clear to follow.
2016-01-20 09:13:04 +01:00
Sergey Sharybin
19adfd3176 Cycles: Fix OpenCL kernel compilation after the bake commit
There is no function pointers in OpenCL specification. For as long
as we want to support this platform we should follow the specifications.

While the code is not totally optimal now, it should not be that huge
of performance issue on CPU since it does jump tables just nicely, so
it's not that much extra computation here.
2016-01-19 22:53:19 +01:00
Sergey Sharybin
52e34ffe33 Cycles: Pass missing shader filter argument to CUDA and OpenCL kernels 2016-01-19 22:53:19 +01:00
Sergey Sharybin
e5904f3eea Cycles: Add a debug flag to disable QBVH 2016-01-19 18:38:41 +01:00
Sergey Sharybin
d44ea880ea Fix T47201: Cycles+OSL keeps image files open until Blender exits
Now image will be opened for while render session is active, this is
needed to keep image cache working correctly. But stopping render
should now release all files descriptors.
2016-01-19 14:56:52 +05:00
Sergey Sharybin
df465368ba Libmv: Solve some strict warnings in tests 2016-01-19 14:06:25 +05:00
Sergey Sharybin
1c71b8e323 Cycles: Fix compilation with older OSL
We didn't switch to OSL-1.6.9 on all platforms yet,
so please keep codeabse compiled with 1.5 for the
time being.
2016-01-16 22:47:04 +05:00
Sergey Sharybin
36aa7e659e Fix T47180: Cycles deform motion blur + displacement behaves weirdly
Displacement shader was not updating motion vertex positions.

Current solution is not totally correct because it applies same offset
for all time steps. Ideally we'll need to evaluate displacement shader
for every time offset separately, but currently we don't have subframe
image access.

For the time being will consider this a TODO.
2016-01-16 15:36:42 +05:00
Lukas Stockner
70e16b3c99 Fix T47181: Blender OSL script node crash (OSL 1.6.9)
Compiling OSL scripts with errors in them would cause Blender to crash since the OSL version
bump to 1.6.9 instead of printing the error to the console as it did before.

With version 1.6.2, OSL added a pointer to an OpenImageIO ErrorHandler as an argument to the
OSLCompiler constructor. However, since it defaults to the NULL pointer, Blender still compiled
fine after the OSL version bump.
It turns out, though, that this pointer is used without further checks inside the OSL code, which
makes it crash when it tries to report an error unless a valid ErrorHandler pointer is specified.
Therefore, this commit simply passes a pointer to the static default handler that OIIO offers,
which prints the error to the console just like OSL did before.

Using this feature for a more advanced error handling and displaying from the Blender side would
be possible and seems reasonable, but for now it's not really relevant for fixing this bug.
2016-01-16 01:32:22 +01:00
Dalai Felinto
9a76354585 Cycles-Bake: Custom Baking passes
The combined pass is built with the contributions the user finds fit.

It is useful for lightmap baking, as well as non-view dependent effects
baking.

The manual will be updated once we get closer to the 2.77 release.
Meanwhile the new page can be found here:

http://dalaifelinto.com/blender-manual/render/cycles/baking.html

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D1674
2016-01-15 13:00:56 -02:00
Campbell Barton
d21eeffbbf Cleanup: used pre-defined atoms in ghost 2016-01-15 18:40:15 +11:00
Campbell Barton
c282373116 Fix T31063: X11 window resize fails on PPC
X11 property access was using wrong sized types that only worked for little endian systems.
2016-01-15 16:47:41 +11:00
Bastien Montagne
2fb3fa1bf1 Usual fixes and tweaks for UI messages. 2016-01-14 17:00:16 +01:00
Sergey Sharybin
8f3bb8d578 Cycles: One more attempt to fix issue mentioned in previous commit 2016-01-14 19:12:11 +05:00
Sergey Sharybin
a4625b910f Cycles: Fix typo in the debug panel commit 2016-01-14 19:07:06 +05:00
Sergey Sharybin
55926ad298 Cycles: Fix string compiler warnings after recent changes 2016-01-14 17:04:56 +05:00
Sergey Sharybin
c9365e25a9 Cycles: Cleanup, spelling and indentation 2016-01-14 17:01:56 +05:00
Thomas Dinges
3ba9742be2 Cycles: Remove the experimental CUDA kernel.
This commit removes the experimental CUDA kernel, making SSS and CMJ
regular features.

Several improvements have been made in the past few
weeks (thanks Sergey!) which make SSS render several times faster (2-3x
compared to 2.76b) on the GPU, and the increased VRAM usage has also been
fixed. Therefore the experimental kernel is no longer needed.

Differential Revision: https://developer.blender.org/D1726

Manual has been updated: too:
https://www.blender.org/manual/render/cycles/features.html
2016-01-14 12:56:08 +01:00
Sergey Sharybin
73feae6f5d Libmv: Solve strict compiler warnings in stubs 2016-01-14 15:56:05 +05:00
Sergey Sharybin
1f273cec00 Cycles: Tweak inline policy for some functions
The goal is to make Experimental kernel closer in performance to the
official kernel, avoiding spills and such.

There should not be big impact on official kernel, own tests showed
few percent performance drop on laptop's GPU. CPU was always the
same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here.

This seems to be the last essential step before we can get rid of
Experimental kernel and enable SSS officially on GPU without causing
some major performance issues.

Surely some more tweaks are possibly required, but that we can do
for until cows go home anyway.
2016-01-14 14:53:05 +05:00
Sergey Sharybin
5af103fe00 Cycles: Reduce scope of some defines set in CMakeLists
Should be no functional changes at all, just speeds up re-compilation
when some features needs to be disabled for development purposes.

For example, when running lots of Valgrind it's handy to disable any
GPU devices because otherwise you'll be wasting quite some time in
the driver while enumerating devices.

Reviewers: dingto, lukasstockner97, brecht, juicyfruit

Differential Revision: https://developer.blender.org/D1730
2016-01-14 13:12:50 +05:00
Sergey Sharybin
d3c55337d3 CMake: Fix typo in CUDA dynload commit 2016-01-14 12:48:14 +05:00
Sergey Sharybin
90e827ba66 CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.

Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.
2016-01-14 12:38:46 +05:00
Sergey Sharybin
2af7637f20 Cycles: Add option to directly link against CUDA libraries
The main purpose of such linking is to make Blender compatible with
NVidia's debuggers and profilers which are doing some LD_PRELOAD
magic to intercept some function calls. Such magic conflicts with
our CUDA wrangler magic and causes segmentation faults.

The option is disabled by default, so there's no affect on any of
artists.

In order to make Blender linked directly against CUDA library use
the WITH_CUDA_DYNLOAD CMake option (it's marked as advanced).
2016-01-14 12:27:22 +05:00
Sergey Sharybin
7142bf6cf3 Cycles: Use proper primitive for the motion subsurface refine 2016-01-12 17:09:29 +05:00
Sergey Sharybin
ac7aefd7c2 Cycles: Use special debug panel to fine-tune debug flags
This panel is only visible when debug_value is set to 256 and has no
affect in other cases. However, if debug value is not set to this
value, environment variables will be used to control which features
are enabled, so there's no visible changes to anyone in fact.

There are some changes needed to prevent devices re-enumeration on
every Cycles session create.

Reviewers: juicyfruit, lukasstockner97, dingto, brecht

Reviewed By: lukasstockner97, dingto

Differential Revision: https://developer.blender.org/D1720
2016-01-12 16:21:30 +05:00
Sergey Sharybin
72e31d6a72 Cycles: Always inline triangle precalc for CUDA devices
Since the SSS changes compiling Experimental sm_52 kernel seems
to work just fine.
2016-01-11 21:41:00 +05:00
Sergey Sharybin
a60c3c6b21 Cycles: Fix for SSS objects being black when combined with motion blur 2016-01-11 21:39:24 +05:00
Thomas Dinges
d23f478863 Cycles: Add utility funcs to UI code, to check GPU usage.
Can be useful sometimes, and we already have this for CPU. Required for
some further work here.
2016-01-10 21:52:39 +01:00
Lukas Stockner
d330162ba6 Cycles: Fix Uninitialized Value compiler warning in the scoped_timer
Although the code made it impossible to use time_start_ uninitialized, at least GCC did
still produce multiple warnings about it.
Since time_dt() is an extremely cheap operation and functionality does not change in any way when
removing the check in the constructor, this commit removes the check and therefore the warning.
2016-01-10 00:50:54 +01:00
Lukas Stockner
64df7a2b38 Cycles: Read Wave texture profile in the XML parser 2016-01-10 00:24:12 +01:00