Commit Graph

18 Commits

Author SHA1 Message Date
Campbell Barton
1daa20ad9f Cleanup: strip trailing space for cycles 2018-07-06 10:17:58 +02:00
Mai Lavelle
352ee7c3ef Cycles: Remove ccl_fetch and SOA 2017-03-08 00:52:41 -05:00
Sergey Sharybin
bc096e1eb8 Cycles: Split ShaderData object and shader flags
We started to run out of bits there, so now we separate flags
which came from __object_flags and which are either runtime or
coming from __shader_flags.

Rule now is: SD_OBJECT_* flags are to be tested against new
object_flags field of ShaderData, all the rest flags are to
be tested against flags field of ShaderData.

There should be no user-visible changes, and time difference
should be minimal. In fact, from tests here can only see hardly
measurable difference and sometimes the new code is somewhat
faster (all within a noise floor, so hard to tell for sure).

Reviewers: brecht, dingto, juicyfruit, lukasstockner97, maiself

Differential Revision: https://developer.blender.org/D2428
2017-01-23 12:56:55 +01:00
Sergey Sharybin
b9311b5e5a Cycles: Make object flag names more obvious that hey are object and not shader 2017-01-23 12:14:17 +01:00
Sergey Sharybin
500e0e9a3d Cycles: Some more inline policy tweaks for CUDA 8
Makes it so toolkit does exactly the same decision about what to inline,
but unfortunately it has really barely visible difference on GTX-980.
2016-08-02 15:13:34 +02:00
George Kyriazis
7f4479da42 Cycles: OpenCL kernel split
This commit contains all the work related on the AMD megakernel split work
which was mainly done by Varun Sundar, George Kyriazis and Lenny Wang, plus
some help from Sergey Sharybin, Martijn Berger, Thomas Dinges and likely
someone else which we're forgetting to mention.

Currently only AMD cards are enabled for the new split kernel, but it is
possible to force split opencl kernel to be used by setting the following
environment variable: CYCLES_OPENCL_SPLIT_KERNEL_TEST=1.

Not all the features are supported yet, and that being said no motion blur,
camera blur, SSS and volumetrics for now. Also transparent shadows are
disabled on AMD device because of some compiler bug.

This kernel is also only implements regular path tracing and supporting
branched one will take a bit. Branched path tracing is exposed to the
interface still, which is a bit misleading and will be hidden there soon.

More feature will be enabled once they're ported to the split kernel and
tested.

Neither regular CPU nor CUDA has any difference, they're generating the
same exact code, which means no regressions/improvements there.

Based on the research paper:

  https://research.nvidia.com/sites/default/files/publications/laine2013hpg_paper.pdf

Here's the documentation:

  https://docs.google.com/document/d/1LuXW-CV-sVJkQaEGZlMJ86jZ8FmoPfecaMdR-oiWbUY/edit

Design discussion of the patch:

  https://developer.blender.org/T44197

Differential Revision: https://developer.blender.org/D1200
2015-05-09 19:52:40 +05:00
Sergey Sharybin
5ff132182d Cycles: Code cleanup, spaces around keywords
This inconsistency drove me totally crazy, it's really confusing
when it's inconsistent especially when you work on both Cycles and
Blender sides.

Shouldn;t cause merge PITA, it's whitespace changes only, Git should
be able to merge it nicely.
2015-03-28 00:15:15 +05:00
Sergey Sharybin
a97bc1bedf Fix T43755: Wireframe attribute doesn't work with displace
This attribute missed derivatives calculation.

Not totally sure what's the proper approach for algebraic derivative
calculation, so calculating them by definition. This isn't fastest
way to do it in this case and could be replaced with some smarter magic
in the wireframe calculation loop.

At least currently implemented approach is better than nothing.
2015-02-21 17:30:29 +05:00
Campbell Barton
dc13969e48 Style cleanup: indentation, braces 2014-05-05 02:19:08 +10:00
Campbell Barton
8d16869d83 Code cleanup: Add -Werror=float-conversion to Cycles 2014-05-03 07:31:46 +10:00
e8b1cfed0a Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
6020d00990 Cycles: add support for mesh deformation motion blur. 2014-03-29 13:03:47 +01:00
0509553b5e Cycles code refactor: changes to make adding new primitive types easier. 2014-03-29 13:03:46 +01:00
c18712e868 Cycles: change __device and similar qualifiers to ccl_device in kernel code.
This to avoids build conflicts with libc++ on FreeBSD, these __ prefixed values
are reserved for compilers. I apologize to anyone who has patches or branches
and has to go through the pain of merging this change, it may be easiest to do
these same replacements in your code and then apply/merge the patch.

Ref T37477.
2013-11-18 08:48:15 +01:00
Thomas Dinges
9e4914e055 Cycles:
* Revert r57203 (len() renaming)
There seems to be a problem with nVidia OpenCL after this and I haven't figured out the real cause yet. 
Better to selectively enable native length() later, after figuring out what's wrong. 

This fixes [#35612].
2013-06-04 17:20:00 +00:00
Thomas Dinges
c5ed6765b9 Cycles / Math functions:
* Rename some math functions:
len -> length
len_squared -> length_squared
normalize_len -> normalize_length

* This way OpenCL uses its inbuilt length() function, rather than our own. The other two functions have been renamed for consistency. 
* Tested CPU, CUDA and OpenCL compile, should be no functional changes.
2013-06-02 20:39:32 +00:00
Thomas Dinges
9bf7a2a8c4 Cycles / Wireframe node:
* Make sure we have valid geometry data, fixes a crash with Lamp objects.

Reported by lichtwerk in IRC, thanks!
2013-05-25 13:34:21 +00:00
Thomas Dinges
3758193c18 Cycles / Wireframe node:
* Added a wireframe node (Input category) to get access to Mesh wireframe data. 
The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size. 
* Only the triangulated mesh is available now, quads is for later. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe

Render and Example file:
http://www.pasteall.org/pic/show.php?id=51731
http://www.pasteall.org/blend/21510
2013-05-20 15:58:37 +00:00