2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 9 Nov 2017 09:59:15 +0000 (10:59 +0100)]
Merge branch 'master' into blender2.8

2 years agoDepsgraph: Add missing handlers of node IDs
Sergey Sharybin [Thu, 9 Nov 2017 08:46:50 +0000 (09:46 +0100)]
Depsgraph: Add missing handlers of node IDs

Worst thing was that point density did not pull object into dependency graph,
which could lead to wrong render results.

2 years agoDepsgraph: Remove chains of scene being passed all over in relations builder
Sergey Sharybin [Thu, 9 Nov 2017 08:17:47 +0000 (09:17 +0100)]
Depsgraph: Remove chains of scene being passed all over in relations builder

2 years agoDepsgraph: Cleanup, remove scene being passed all over
Sergey Sharybin [Wed, 8 Nov 2017 17:06:51 +0000 (18:06 +0100)]
Depsgraph: Cleanup, remove scene being passed all over

Use the state one instead.

2 years agoDepsgraph: Remove bmain from internal builder API
Sergey Sharybin [Wed, 8 Nov 2017 16:47:00 +0000 (17:47 +0100)]
Depsgraph: Remove bmain from internal builder API

Use the one from state.

2 years agoDepsgraph: Make bmain part of builder state and remove bmain from public API
Sergey Sharybin [Wed, 8 Nov 2017 16:43:53 +0000 (17:43 +0100)]
Depsgraph: Make bmain part of builder state and remove bmain from public API

2 years agoDepsgraph: Cleanup, use google style for private members
Sergey Sharybin [Wed, 8 Nov 2017 16:38:42 +0000 (17:38 +0100)]
Depsgraph: Cleanup, use google style for private members

2 years agoDepsgraph: Synchronize nodes and relations builders
Sergey Sharybin [Wed, 8 Nov 2017 16:34:19 +0000 (17:34 +0100)]
Depsgraph: Synchronize nodes and relations builders

2 years agoDepsgraph: Fix wrong ID type being compared
Sergey Sharybin [Wed, 8 Nov 2017 16:33:46 +0000 (17:33 +0100)]
Depsgraph: Fix wrong ID type being compared

2 years agoDepsgraph: Cleanup, reduce indentation level
Sergey Sharybin [Wed, 8 Nov 2017 16:32:03 +0000 (17:32 +0100)]
Depsgraph: Cleanup, reduce indentation level

2 years agoDepsgraph: Assert when node uses unhandled ID type
Sergey Sharybin [Wed, 8 Nov 2017 16:30:28 +0000 (17:30 +0100)]
Depsgraph: Assert when node uses unhandled ID type

2 years agoCycles: Replace __MAX_CLOSURE__ build option with runtime integrator variable
Mai Lavelle [Thu, 9 Nov 2017 05:49:15 +0000 (00:49 -0500)]
Cycles: Replace __MAX_CLOSURE__ build option with runtime integrator variable

Goal is to reduce OpenCL kernel recompilations.

Currently viewport renders are still set to use 64 closures as this seems to
be faster and we don't want to cause a performance regression there. Needs
to be investigated.

Reviewed By: brecht

Differential Revision:

2 years agoFix crash when loading pre 2.5 files.
Julian Eisel [Wed, 8 Nov 2017 22:51:30 +0000 (23:51 +0100)]
Fix crash when loading pre 2.5 files.

Versioning code involving WM wouldn't run then (WM was just introduced
in 2.5).

2 years agoFarewell Scene->base
Dalai Felinto [Wed, 8 Nov 2017 14:16:49 +0000 (12:16 -0200)]
Farewell Scene->base

While getting rid of Scene->base we got the following fixes:

* Fix "Convert To" operator
* Fix "NLA allowing to selected objects that are not selectable
* Fix scene.objects (readonly, no option to link/unlink)

Note: Collada needs to use the context SceneLayer for adding objects
however I added a placeholder, so Collada maintainers can fix this

2 years agoRevert "Depsgraph: Fix crash with copy on write when scene has legacy bases"
Dalai Felinto [Wed, 8 Nov 2017 14:25:43 +0000 (12:25 -0200)]
Revert "Depsgraph: Fix crash with copy on write when scene has legacy bases"

This reverts commit 00ddbd5848da7e746e23695cff00a739eaf75cf2.

2 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Wed, 8 Nov 2017 20:35:31 +0000 (18:35 -0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

2 years agoSilence warning from Collada
Dalai Felinto [Wed, 8 Nov 2017 20:33:17 +0000 (18:33 -0200)]
Silence warning from Collada

2 years agoDepsgraph: Use iterator over flat array for depsgraph_query
Sergey Sharybin [Wed, 8 Nov 2017 13:37:31 +0000 (14:37 +0100)]
Depsgraph: Use iterator over flat array for depsgraph_query

This way iteration order is much more predictable. This also solves issue with
randomly failing Cycles regression tests.

2 years agoSubject: [PATCH 2/3] Depsgraph: Replace iteration over ghash with iteration over...
Sergey Sharybin [Wed, 8 Nov 2017 13:48:25 +0000 (14:48 +0100)]
Subject: [PATCH 2/3] Depsgraph: Replace iteration over ghash with iteration over flat array

2 years agoDepsgraph: Introduce flat list of ID nodes
Sergey Sharybin [Wed, 8 Nov 2017 13:29:58 +0000 (14:29 +0100)]
Depsgraph: Introduce flat list of ID nodes

The idea is to allow iterating over ID nodes in exact order of their
construction, and in order which will not change dependent on memory
pointers or anything.

2 years agoDepsgraph: Remove traces of old single-per-scene dependency graph
Sergey Sharybin [Wed, 8 Nov 2017 09:27:33 +0000 (10:27 +0100)]
Depsgraph: Remove traces of old single-per-scene dependency graph

2 years agoDepsgraph: Move storage from single per-scene depsgraph to a hash storage
Sergey Sharybin [Tue, 7 Nov 2017 16:01:14 +0000 (17:01 +0100)]
Depsgraph: Move storage from single per-scene depsgraph to a hash storage

Depsgraph itself is still created fer the whole scene rather than for a
single layer, this is to be addressed next.

The storage for those dependency graphs is in scene, but now it is a hash
indexed by layer. In the future we can extend hash key to include extra
information (workspace? window?).

2 years agoPartial Fix T53269: Dupli-verts/dupli-faces not working
Dalai Felinto [Wed, 8 Nov 2017 12:34:25 +0000 (10:34 -0200)]
Partial Fix T53269: Dupli-verts/dupli-faces not working

This fixes the issue for the Draw Manager, but for Cycles this is still not
working. The iterator bpy.context.depsgraph.duplis seems to be correct though.

2 years agoI18n: add Hausa languages, since we now have a few messages translated. ;)
Bastien Montagne [Wed, 8 Nov 2017 09:10:42 +0000 (10:10 +0100)]
I18n: add Hausa languages, since we now have a few messages translated. ;)

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 8 Nov 2017 00:11:43 +0000 (01:11 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix blender player build.
Brecht Van Lommel [Wed, 8 Nov 2017 00:10:49 +0000 (01:10 +0100)]
Fix blender player build.

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Tue, 7 Nov 2017 23:20:59 +0000 (00:20 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix incorrect bevel shader in GLSL (should work as if there is no bevel node).
Brecht Van Lommel [Tue, 7 Nov 2017 23:19:24 +0000 (00:19 +0100)]
Fix incorrect bevel shader in GLSL (should work as if there is no bevel node).

2 years agoFix T53092: errors reading EXR files with different data/display window.
Brecht Van Lommel [Thu, 19 Oct 2017 01:55:11 +0000 (03:55 +0200)]
Fix T53092: errors reading EXR files with different data/display window.

Multilayer/multiview OpenEXRs did not read the full data window like single
layer, now it should be consistent.

2 years agoFix various issues with (multiview) OpenEXR file save/load.
Brecht Van Lommel [Fri, 20 Oct 2017 13:18:26 +0000 (15:18 +0200)]
Fix various issues with (multiview) OpenEXR file save/load.

* Fix saving a multiview render from the image editor giving invalid files.
* Fix failure to load multiview images with a single view per part.
* Fix loss of multiview metadata when saving/loading a single view.
* Fix Z-Buffer writing option for single layer EXR not being respected.

Multiview EXRs are now always handled as multilayer internally, significantly
reducing the amount of code.

Reviewed By: dfelinto

Differential Revision:

2 years agoFix EXR multilayer compositing result saving issues.
Brecht Van Lommel [Thu, 26 Oct 2017 12:23:18 +0000 (14:23 +0200)]
Fix EXR multilayer compositing result saving issues.

* It was saved as Combined.Combined instead of Composite.Combined.
* It was written even if no compositing was enabled.

2 years agoFix image editor showing pass name when there is only a combined pass.
Brecht Van Lommel [Thu, 26 Oct 2017 12:17:58 +0000 (14:17 +0200)]
Fix image editor showing pass name when there is only a combined pass.

2 years agoFix incorrect color management when saving JPG previews for EXR.
Brecht Van Lommel [Thu, 26 Oct 2017 12:14:12 +0000 (14:14 +0200)]
Fix incorrect color management when saving JPG previews for EXR.

2 years agoCycles: add bevel shader, for raytrace based rounded edges.
Brecht Van Lommel [Fri, 18 Aug 2017 16:37:05 +0000 (18:37 +0200)]
Cycles: add bevel shader, for raytrace based rounded edges.

The algorithm averages normals from nearby surfaces. It uses the same
sampling strategy as BSSRDFs, casting rays along the normal and two
orthogonal axes, and combining the samples with MIS.

The main concern here is that we are introducing raytracing inside
shader evaluation, which could be quite bad for GPU performance and
stack memory usage. In practice it doesn't seem so bad though.

Note that using this feature can easily slow down renders 20%, and
that if you care about performance then it's better to use a bevel
modifier. Mainly this is useful for baking, and for cases where the
mesh topology makes it difficult for the bevel modifier to work well.

Differential Revision:

2 years agoCode refactor: rename subsurface to local traversal, for reuse.
Brecht Van Lommel [Mon, 30 Oct 2017 19:25:08 +0000 (20:25 +0100)]
Code refactor: rename subsurface to local traversal, for reuse.

2 years agoCycles: antialias normal baking if the mesh has a bump map.
Brecht Van Lommel [Mon, 30 Oct 2017 16:19:37 +0000 (17:19 +0100)]
Cycles: antialias normal baking if the mesh has a bump map.

2 years agoCycles: add an extra CUDA synchronize before rendering.
Brecht Van Lommel [Tue, 7 Nov 2017 02:38:49 +0000 (03:38 +0100)]
Cycles: add an extra CUDA synchronize before rendering.

It should not be needed as far as I know, but just in case it fixes any
of the recent issues like T52572.

2 years agoFix incorrect MIS weights in Cycles with multiple lights.
Brecht Van Lommel [Tue, 7 Nov 2017 02:28:10 +0000 (03:28 +0100)]
Fix incorrect MIS weights in Cycles with multiple lights.

This causes some difference in the classroom scene, where ray visibility
tricks are used and break the MIS balance. Otherwise there doesn't seem
to be much effect, but better to use the right formulas. Problem originally
identified by Lukas.

2 years agoSanitize use of BLI_iterator
Dalai Felinto [Tue, 7 Nov 2017 16:06:55 +0000 (14:06 -0200)]
Sanitize use of BLI_iterator

We now initialize iter.valid as true as part of the main iterator (and manually
when using via Python). And we don't even bother setting iter->current to NULL
if it's invalid. Let's stick to using iter->valid only.

2 years agoDepsgraph: Remove old unused function which is no longer to be used
Sergey Sharybin [Tue, 7 Nov 2017 15:53:10 +0000 (16:53 +0100)]
Depsgraph: Remove old unused function which is no longer to be used

2 years agoDepsgraph: Get away from legacy API used in event loop
Sergey Sharybin [Tue, 7 Nov 2017 15:51:18 +0000 (16:51 +0100)]
Depsgraph: Get away from legacy API used in event loop

A bit tricky for now, needs some clear design about when to do

2 years agoDepsgraph: initialize scene to NULL
Sergey Sharybin [Tue, 7 Nov 2017 15:42:40 +0000 (16:42 +0100)]
Depsgraph: initialize scene to NULL

2 years agoDepsgraph: Simplify some workarounds and make API closer to final
Sergey Sharybin [Tue, 7 Nov 2017 15:29:31 +0000 (16:29 +0100)]
Depsgraph: Simplify some workarounds and make API closer to final

2 years agoWindows: Add additional crash diagnostic information.
Ray Molenkamp [Tue, 7 Nov 2017 14:57:59 +0000 (07:57 -0700)]
Windows: Add additional crash diagnostic information.

To help diagnose issues like T53259, it is useful to know the module causing the issue (is it us, or some opengl icd, or python module?) and while we cannot do stackdumps on release builds on windows, it is possible to display the faulting module. This commit changes the exception handler to output the following information:

Error   : EXCEPTION_ACCESS_VIOLATION (Type of exception , this we had before)
Address : 0x0000000140193726 (Address of the exception, new)
Module  : k:\BlenderGit\build_windows_Full_noge_x64_vc15_Release\bin\Release\blender.exe (module of the exception, new)

2 years agoFix jumps-dependent-on-uninitialized-variable for iterators
Dalai Felinto [Tue, 7 Nov 2017 14:50:04 +0000 (12:50 -0200)]
Fix jumps-dependent-on-uninitialized-variable for iterators

We cannot have iter->valid unitialized, but we need to be sure it is set to true on begin.
Bug found by Sergey Sharybin.

2 years agoFix bplayer (c).
Bastien Montagne [Tue, 7 Nov 2017 14:35:36 +0000 (15:35 +0100)]
Fix bplayer (c).

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 7 Nov 2017 12:57:16 +0000 (13:57 +0100)]
Merge branch 'master' into blender2.8

2 years agoCycles: Cleanup, style
Sergey Sharybin [Tue, 7 Nov 2017 12:55:58 +0000 (13:55 +0100)]
Cycles: Cleanup, style

2 years agoDepsgraph Iterator: Refactor skip logic
Dalai Felinto [Tue, 7 Nov 2017 12:05:42 +0000 (10:05 -0200)]
Depsgraph Iterator: Refactor skip logic

This was leading to crashes on Cycles as well as misleading

I can even move the iter->skip as part of DEGObjectsIteratorData instead of
BLI_Iterator, but if I do it will be a separate commit.

Thanks Sergey Sharibyn for the well done sample file and patch suggestion.

2 years agoDepsgraph: Remove forced dependencies update/evaluation from file open
Sergey Sharybin [Mon, 6 Nov 2017 16:39:21 +0000 (17:39 +0100)]
Depsgraph: Remove forced dependencies update/evaluation from file open

This was originally done as a fix for T37713, but now this workaround becomes
tricky since we don't know which layers to update scene for. Even more, render
engine is supposed to have own dependency graphs amd those ones do not exist
yet at the file open time.

Keep an eye on T37713, since that's where the original workaround is coming

2 years agoDepsgraph: Fix/workaround command line rendering of sequencer
Sergey Sharybin [Tue, 7 Nov 2017 09:49:25 +0000 (10:49 +0100)]
Depsgraph: Fix/workaround command line rendering of sequencer

Really hacky, but allows to run regression tests and see if the new design
is working as expected.

2 years agoDepsgraph: Fix/workaround crash when rendering from command line
Sergey Sharybin [Tue, 7 Nov 2017 09:10:21 +0000 (10:10 +0100)]
Depsgraph: Fix/workaround crash when rendering from command line

Need to ensure Render has proper dependency graph.

While this is a subject of re-design (render pipeline should manage all
dependency graphs it needs, and not demand external users to provide
depsgraph), this is good to have something working, so we can run regression
tests and such.

2 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Tue, 7 Nov 2017 02:06:18 +0000 (03:06 +0100)]
Merge branch 'master' into blender2.8

2 years agoFix T53129: Cycles missing update when changing image auto refresh.
Brecht Van Lommel [Tue, 7 Nov 2017 01:27:27 +0000 (02:27 +0100)]
Fix T53129: Cycles missing update when changing image auto refresh.

Previously auto refresh worked, but only if it was already enabled before
starting the viewport render.

2 years agoFix break on duplicated instances since IDNodes depsgraph iterator
Dalai Felinto [Mon, 6 Nov 2017 23:18:27 +0000 (21:18 -0200)]
Fix break on duplicated instances since IDNodes depsgraph iterator

2 years agomacOS: remove old OpenMP lib stuff from cmake
Arto Kitula [Mon, 6 Nov 2017 21:54:35 +0000 (23:54 +0200)]
macOS: remove old OpenMP lib stuff from cmake

2 years agoDepsgraph: Iterates over ID Nodes instead of Bases
Dalai Felinto [Mon, 6 Nov 2017 19:44:39 +0000 (17:44 -0200)]
Depsgraph: Iterates over ID Nodes instead of Bases

Although this works by itself, it should actually happen after:

"Reshuffle collections base flags evaluation, make it so object is gathering
its base flags from collections."

Meanwhile we have one single hacky function (deg_flush_base_flags_and_settings)
to be removed once the task above is tackled.

Reviewers: sergey

Differential Revision:

2 years agoDRW: Fix compilation error.
Clément Foucault [Mon, 6 Nov 2017 17:40:29 +0000 (18:40 +0100)]
DRW: Fix compilation error.

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 6 Nov 2017 17:02:46 +0000 (18:02 +0100)]
Merge branch 'master' into blender2.8


2 years agoEevee: Remove uses of DRW_shgroup_call_dynamic_add_empty in shadows and probe rendering.
Clément Foucault [Mon, 6 Nov 2017 15:54:33 +0000 (16:54 +0100)]
Eevee: Remove uses of DRW_shgroup_call_dynamic_add_empty in shadows and probe rendering.

This was adding an unecessary high number of DRWCall per objects.

2 years agoDRW: Use pseudo persistent memory pool for the rendering data structure.
Clément Foucault [Mon, 6 Nov 2017 15:47:23 +0000 (16:47 +0100)]
DRW: Use pseudo persistent memory pool for the rendering data structure.

This gets rid of the bottleneck of allocation / free of thousands of elements every frame.

Cache time (Eevee) (test scene is default file with cube duplicated 3241 times)
pre-patch: 23ms
post-patch: 14ms

Bastien Montagne [Mon, 6 Nov 2017 16:17:10 +0000 (17:17 +0100)]

This makes code closer to id_override/assent-engine ones, which
introduce a new type of linked data, and hence reserve
ID_IS_LINKED_DATABLOCK to real linked datablocks.

2 years agoFix T51604: Support Auto-Smooth in Edit-Mesh
Germano [Mon, 6 Nov 2017 16:14:07 +0000 (14:14 -0200)]
Fix T51604: Support Auto-Smooth in Edit-Mesh
and allocate loop_normals in MeshRenderData instead of CustomData

Differential Revision: D2907

2 years agoFix T53250: Crash when linking/appending a scene to a blend when another linked scene...
Bastien Montagne [Mon, 6 Nov 2017 14:16:40 +0000 (15:16 +0100)]
Fix T53250: Crash when linking/appending a scene to a blend when another linked scene in this blend is currently open/active.

Inner DAG code would not check against NULL pointer, and in case of an
active linked scene, scene pointer will be NULL here, so we have to
check it ourself. ;)

2 years agoDepsgraph: Cleanup, remove obsolete unused function
Sergey Sharybin [Fri, 3 Nov 2017 17:15:09 +0000 (18:15 +0100)]
Depsgraph: Cleanup, remove obsolete unused function

2 years ago epsgraph: Use explicit graph API for sequencer
Sergey Sharybin [Fri, 3 Nov 2017 17:13:53 +0000 (18:13 +0100)]
 epsgraph: Use explicit graph API for sequencer

2 years agoDepsgraph: Use explicit graph API for point cache
Sergey Sharybin [Fri, 3 Nov 2017 17:04:50 +0000 (18:04 +0100)]
Depsgraph: Use explicit graph API for point cache

2 years agoDepsgraph: Use explicit graph API for audio bake
Sergey Sharybin [Fri, 3 Nov 2017 16:59:15 +0000 (17:59 +0100)]
Depsgraph: Use explicit graph API for audio bake

2 years agoDepsgraph: Use explicit graph API for OpenGL render
Sergey Sharybin [Fri, 3 Nov 2017 16:57:46 +0000 (17:57 +0100)]
Depsgraph: Use explicit graph API for OpenGL render

2 years agoDepsgraph: Use new API for alembic C-API
Sergey Sharybin [Fri, 3 Nov 2017 16:52:26 +0000 (17:52 +0100)]
Depsgraph: Use new API for alembic C-API

2 years agoUpdate comment, reference new API function
Sergey Sharybin [Fri, 3 Nov 2017 16:49:28 +0000 (17:49 +0100)]
Update comment, reference new API function

2 years agoDepsgraph: Use new scene update API in preview render
Sergey Sharybin [Fri, 3 Nov 2017 16:48:48 +0000 (17:48 +0100)]
Depsgraph: Use new scene update API in preview render

2 years agoDepsgraph: Make graph to be per-scene-layer for RNA
Sergey Sharybin [Fri, 3 Nov 2017 16:27:13 +0000 (17:27 +0100)]
Depsgraph: Make graph to be per-scene-layer for RNA

New access is This will give depsgraph
for a given layer. In the future there will need to be some extra context to be

2 years agoDepsgraph: Cleanup, remove depgraph_legacy from evaluation routines
Sergey Sharybin [Fri, 3 Nov 2017 16:04:38 +0000 (17:04 +0100)]
Depsgraph: Cleanup, remove depgraph_legacy from evaluation routines

2 years agoDepsgraph: Cleanup, remove depsgraph_legacy from building routines
Sergey Sharybin [Fri, 3 Nov 2017 16:03:33 +0000 (17:03 +0100)]
Depsgraph: Cleanup, remove depsgraph_legacy from building routines

2 years agoDepsgraph: Cleanup, remove unused function
Sergey Sharybin [Fri, 3 Nov 2017 16:00:00 +0000 (17:00 +0100)]
Depsgraph: Cleanup, remove unused function

2 years agoDepsgraph: Cleanup, remove depsgraph_legacy from
Sergey Sharybin [Fri, 3 Nov 2017 15:57:40 +0000 (16:57 +0100)]
Depsgraph: Cleanup, remove depsgraph_legacy from

2 years agoDepsgraph: Avoid non-requested allocation of depsgraph
Sergey Sharybin [Fri, 3 Nov 2017 15:49:57 +0000 (16:49 +0100)]
Depsgraph: Avoid non-requested allocation of depsgraph

2 years agoCycles: reduce closure memory usage for emission/shadow shader data.
Brecht Van Lommel [Wed, 1 Nov 2017 20:02:28 +0000 (21:02 +0100)]
Cycles: reduce closure memory usage for emission/shadow shader data.

With a Titan Xp, reduces path trace local memory from 1092MB to 840MB.
Benchmark performance was within 1% with both RX 480 and Titan Xp.

Original patch was implemented by Sergey.

Differential Revision:

2 years agoCode refactor: sum transparent and absorption weights outside closures.
Brecht Van Lommel [Wed, 1 Nov 2017 20:07:15 +0000 (21:07 +0100)]
Code refactor: sum transparent and absorption weights outside closures.

2 years agoCode refactor: remove emission and background closures, sum directly.
Brecht Van Lommel [Wed, 1 Nov 2017 18:00:42 +0000 (19:00 +0100)]
Code refactor: remove emission and background closures, sum directly.

2 years agoCycles: fix inefficient attribute map storage, saves 615MB in victor scene.
Brecht Van Lommel [Sun, 5 Nov 2017 16:40:36 +0000 (17:40 +0100)]
Cycles: fix inefficient attribute map storage, saves 615MB in victor scene.

2 years agoCode refactor: device memory cleanups, preparing for mapped host memory.
Brecht Van Lommel [Sat, 4 Nov 2017 23:34:30 +0000 (00:34 +0100)]
Code refactor: device memory cleanups, preparing for mapped host memory.

2 years agoCycles: reserve CUDA local memory ahead of time.
Brecht Van Lommel [Sat, 4 Nov 2017 17:06:48 +0000 (18:06 +0100)]
Cycles: reserve CUDA local memory ahead of time.

This way we can log the amount of memory used, and it will be important
for host mapped memory support.

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 5 Nov 2017 13:07:19 +0000 (00:07 +1100)]
Merge branch 'master' into blender2.8

2 years agoCleanup: order buffer length after the buffer
Campbell Barton [Sun, 5 Nov 2017 13:04:46 +0000 (00:04 +1100)]
Cleanup: order buffer length after the buffer

2 years agoCleanup: remove paranoid NULL check
Campbell Barton [Sun, 5 Nov 2017 12:34:40 +0000 (23:34 +1100)]
Cleanup: remove paranoid NULL check

2 years agoCleanup: indentation, line wrapping
Campbell Barton [Sun, 5 Nov 2017 03:50:15 +0000 (14:50 +1100)]
Cleanup: indentation, line wrapping

2 years agoCleanup: spelling
Campbell Barton [Sun, 5 Nov 2017 03:33:18 +0000 (14:33 +1100)]
Cleanup: spelling

2 years agoFix broken macOS build with libsndfile, name is different than in master.
Brecht Van Lommel [Sat, 4 Nov 2017 16:48:46 +0000 (17:48 +0100)]
Fix broken macOS build with libsndfile, name is different than in 

2 years agoTool System: Don't add duplicate keymap items
Campbell Barton [Sat, 4 Nov 2017 14:38:51 +0000 (01:38 +1100)]
Tool System: Don't add duplicate keymap items

2 years agoUI: show tool-tips for each tools shortcuts
Campbell Barton [Sat, 4 Nov 2017 14:29:52 +0000 (01:29 +1100)]
UI: show tool-tips for each tools shortcuts

2 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 4 Nov 2017 10:45:52 +0000 (21:45 +1100)]
Merge branch 'master' into blender2.8

2 years agoUI: tool-tip refactor, don't hard code field types
Campbell Barton [Sat, 4 Nov 2017 08:24:43 +0000 (19:24 +1100)]
UI: tool-tip refactor, don't hard code field types

Allow other kinds of tips be created w/o exceeding hard limits.

2 years agoUI: correct flag re-use
Campbell Barton [Sat, 4 Nov 2017 03:10:04 +0000 (14:10 +1100)]
UI: correct flag re-use

Adding ability to show a button as pressed w/o UI_SELECT set caused
other flags to be cleared that shouldn't have been.

2 years agoCode refactor: replace CUDA array with linear memory for 1D and 2D textures.
Brecht Van Lommel [Fri, 3 Nov 2017 20:28:13 +0000 (21:28 +0100)]
Code refactor: replace CUDA array with linear memory for 1D and 2D textures.

This is a prequisite for getting host memory allocation to work. There appears
to be no support for 3D textures using host memory. The original version of
this code was written by Stefan Werner for D2056.

2 years agoFix T53247: mixed CPU + GPU render wrong texture limits.
Brecht Van Lommel [Fri, 3 Nov 2017 19:21:19 +0000 (20:21 +0100)]
Fix T53247: mixed CPU + GPU render wrong texture limits.

2 years agoScene API: Switch to explicit scene graph update API
Sergey Sharybin [Fri, 3 Nov 2017 15:35:12 +0000 (16:35 +0100)]
Scene API: Switch to explicit scene graph update API

This is part of lets-get-rid-of-scene->legacy_depsgraph work

2 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Fri, 3 Nov 2017 15:31:53 +0000 (16:31 +0100)]
Merge branch 'master' into blender2.8

2 years agoScene RNA API: More global mains goes away
Sergey Sharybin [Fri, 3 Nov 2017 15:28:37 +0000 (16:28 +0100)]
Scene RNA API: More global mains goes away