Commit Graph

110503 Commits

Author SHA1 Message Date
Hans Goudey
1ec7075ff2 Merge branch 'blender-v3.0-release' 2021-11-10 15:44:13 -06:00
Hans Goudey
22ffd69a91 Fix T89313: Attribute search crash with animation playback
rBc473b2ce8bdbf8fa42 improved the situation somewhat, but
attribute search still crashes during animation playback, because
the UI search data references stale memory. The proper solution
is to allow the search to own data rather than just referencing it,
but I would prefer not to do that for 3.0. In the meantime, just
disable attribute search when animation is playing.

Differential Revision: https://developer.blender.org/D13179
2021-11-10 15:43:18 -06:00
Thomas Dinges
9ca8bf0b29 Merge branch 'blender-v3.0-release' 2021-11-10 22:28:03 +01:00
Thomas Dinges
040630bb9a Fix wrong device check in HIP kernel compile.
Also cleanup some related code, that was falsely copied from CUDA.

Differential Revision: https://developer.blender.org/D13180
2021-11-10 22:24:53 +01:00
Brecht Van Lommel
3fa86f4b28 Merge branch 'blender-v3.0-release' 2021-11-10 20:19:09 +01:00
Brecht Van Lommel
7689f501e2 Cycles: enable HIP device and binaries on Windows
We've now done testing to confirm this works with RDNA and RDNA2 AMD GPUs
on Windows. The AMD driver needed for this will soon be released publicly.
2021-11-10 20:16:44 +01:00
Thomas Dinges
e507a789b3 Cycles: disable graphics interop for HIP devices
This is due to a driver bug, so disable it for now until it gets resolved
in a future driver release.

Ref T92972

Differential Revision: https://developer.blender.org/D13167
2021-11-10 20:16:44 +01:00
Brecht Van Lommel
6b0008129e Fix T92972: Cycles HIP wrong render display after a recent refactor
It's unclear why this fails. Maybe the size of half4 is not the expected
8 bytes and adjacent pixels are overwritten. Or there is some bug in the
HIP compiler writing a struct into global memory, which we probably don't
do elsewhere in the kernel.

Thanks to Thomas, William and Jeroen for helping investigate this.
2021-11-10 20:03:07 +01:00
Brecht Van Lommel
c8e93da0a7 Fix Cycles assert in denoising fallback to OIDN 2021-11-10 19:56:30 +01:00
Hans Goudey
abf62d06d1 Merge branch 'blender-v3.0-release' 2021-11-10 11:11:58 -06:00
Hans Goudey
35ae7ab933 Cleanup: Use bool instead of int 2021-11-10 11:11:35 -06:00
Hans Goudey
cc17ed26ce Merge branch 'blender-v3.0-release' 2021-11-10 10:52:34 -06:00
Hans Goudey
20224369d9 Geometry Nodes: Clarify modifier node group errors
This commit adds modifier error messages to some of the cases
where the node group is configured improperly. It also clears the
geometry set when there is an error with the node group. This is
consistent to what we do in nodes themselves, and feels more
intuitive than passing the input geometry through the node group
silently.

Fixes T87142
2021-11-10 10:52:18 -06:00
Hans Goudey
e9b7e5e0b9 Merge branch 'blender-v3.0-release' 2021-11-10 10:47:09 -06:00
Hans Goudey
67e5edbaa3 Fix: Incorrect translation search for modifier error messages
This function was renamed in rB2bb9a465e6c0e1ca765, but it looks like
that commit missed changing the corresponding translation regular
expression.

Differential Revision: https://developer.blender.org/D13171
2021-11-10 10:46:49 -06:00
Patrick Mours
f565620435 Fix T92985: CUDA errors with Cycles film convert kernels
rB3a4c8f406a3a3bf0627477c6183a594fa707a6e2 changed the macros that create the film
convert kernel entry points, but in the process accidentally changed the parameter definition
to one of those (which caused CUDA launch and misaligned address errors) and changed the
implementation as well. This restores the correct implementation from before.

In addition, the `ccl_gpu_kernel_threads` macro did not work as intended and caused the
generated launch bounds to end up with an incorrect input for the second parameter (it was
set to "thread_num_registers", rather than the result of the block number calculation). I'm
not entirely sure why, as the macro definition looked sound to me. Decided to simply go with
two separate macros instead, to simplify and solve this.

Also changed how state is captured with the `ccl_gpu_kernel_lambda` macro slightly, to avoid
a compiler warning (expression has no effect) that otherwise occurred.

Maniphest Tasks: T92985

Differential Revision: https://developer.blender.org/D13175
2021-11-10 15:49:50 +01:00
Jeroen Bakker
a6e4cb092e Merge branch 'blender-v3.0-release' 2021-11-10 13:53:44 +01:00
Jeroen Bakker
bc0c06ecbe Fix T91518: crash when recalculating looptris after clearing geometry.
When clearing geometry the runtime mutexes of a mesh were freed. This
resulted in crashes afterwards. The clear geometry is an RNA function so
would only effect when using from scripts.

This patch separates init/freeing of the mutexes from other code so they
can be used when needed.

Reviewed By: mont29

Maniphest Tasks: T91518

Differential Revision: https://developer.blender.org/D13142
2021-11-10 13:50:15 +01:00
Jacques Lucke
53468c2b13 Merge branch 'blender-v3.0-release' 2021-11-10 13:43:08 +01:00
Jacques Lucke
47b8baa5c4 Fix T92864: curve object does not sync correctly in cycles
The issue was that the `object_is_geometry` method was used in two different
contexts that expected the function to behave differently. So a recent change
that fixed `object_is_geometry` for one context, broke it for the other context.
The two contexts are:
* Check if a "real" object can contain a geometry to check if it has to be tagged
  for sync after an update.
* Check if an object/instance actually is a geometry that cycles can work with.

I created a new `object_can_have_geometry` method for the first use case, instead
of trying to adapt the existing object_is_geometry method to serve both uses.
Additionally, I changed it so that a BObjectInfo is passed into `object_is_geometry`
to make it more explicit when this method is supposed to be used.

Differential Revision: https://developer.blender.org/D13135
2021-11-10 13:38:07 +01:00
Philipp Oeser
03e22da665 Merge branch 'blender-v3.0-release' 2021-11-10 12:47:01 +01:00
Philipp Oeser
aa2f6e5977 Fix T92979: Emission Strength Animation read wrong in 3.0
First this was wrong for files written in 2.93 read into blender in 3.0
after the CyclesX merge.
Then this was fixed by versioning in rB6321dd3d4007.
But this caused files written in 3.0 to have this versioning applied as
well (leading to socket shifting).

Now only do the versioning for files created before the CyclesX
merge.

Maniphest Tasks: T92979

Differential Revision: https://developer.blender.org/D13173
2021-11-10 12:45:41 +01:00
Campbell Barton
ff0c42acfc Merge branch 'blender-v3.0-release' 2021-11-10 21:22:01 +11:00
Campbell Barton
a49d6a5350 Merge branch 'blender-v3.0-release' 2021-11-10 21:21:58 +11:00
Campbell Barton
bec72a43ae Fix T92874: Custom normals reset when vertex is deleted
Storing and restoring custom normals was broken by
39b2a7bb7e815e051348bf5c5ec777d091324164

This also caused "Sharp Edge" option for Weld by Distance to fail,
reported as T92875.
2021-11-10 21:11:41 +11:00
Hans Goudey
aa440923c8 Fix: Hide selection value in resample curve node, fix order
Selection sockets are meant to come right after the geometry,
this was missed in review of rBa7672caeb255e3.
Also, the selection value was not hidden.
2021-11-09 17:23:11 -06:00
Hans Goudey
1f6010e609 Cleanup: Move info_stats.c to C++ 2021-11-09 15:57:58 -06:00
Michael Jones
3a4c8f406a Cycles: Adapt shared kernel/device/gpu layer for MSL
This patch adapts the shared kernel entrypoints so that they can be compiled as MSL (Metal Shading Language). Where possible, the adaptations avoid changes in common code.

In MSL, kernel function inputs are explicitly bound to resources. In the case of argument buffers, we declare a struct containing the kernel arguments, accessible via device pointer. This differs from CUDA and HIP where kernel function arguments are declared as traditional C-style function parameters. This patch adapts the entrypoints declared in kernel.h so that they can be translated via a new `ccl_gpu_kernel_signature` macro into the required parameter struct + kernel entrypoint pairing for MSL.

MSL buffer attribution must be applied to function parameters or non-static class data members. To allow universal access to the integrator state, kernel data, and texture fetch adapters, we wrap all of the shared kernel code in a `MetalKernelContext` class. This is achieved by bracketing the appropriate kernel headers with "context_begin.h" and "context_end.h" on Metal. When calling deeper into the kernel code, we must reference the context class (e.g. `context.integrator_init_from_camera`). This extra prefixing is performed by a set of defines in "context_end.h". These will require explicit maintenance if entrypoints change. We invite discussion on more maintainable ways to enforce correctness.

Lambda expressions are not supported on MSL, so a new `ccl_gpu_kernel_lambda` macro generates an inline function object and optionally capturing any required state. This yields the same behaviour. This approach is applied to all parallel_... implementations which are templated by operation. The lambda expressions in the film_convert... kernels don't adapt cleanly to use function objects. However, these entrypoints can be macro-generated more concisely to avoid lambda expressions entirely, instead relying on constant folding to handle the pixel/channel conversions.

A separate implementation of `gpu_parallel_active_index_array` is provided for Metal to workaround some subtle differences in SIMD width, and also to encapsulate some required thread parameters which must be declared as explicit entrypoint function parameters.

Ref T92212

Reviewed By: brecht

Maniphest Tasks: T92212

Differential Revision: https://developer.blender.org/D13109
2021-11-09 21:43:10 +00:00
Hans Goudey
7b530c6096 Fix: Incorrect assert in dot grid drawing
It's totally valid for the grid levels to be zero.
2021-11-09 13:15:34 -06:00
Hans Goudey
4648c4990c Merge branch 'blender-v3.0-release' 2021-11-09 13:08:36 -06:00
Hans Goudey
44239fa106 Fix: Crash with no active object after recent commit
rBaa13c4b386b13111 added a check for the active object
in drawing code, but it missed adding a check for the active
base before trying to retrieve its object.
2021-11-09 12:59:20 -06:00
Ray Molenkamp
7c25399576 tests/benchmarks: Fix operation on windows
The test script did not work on windows
since it had some trouble importing the
api module on the blender side of things.

turning the file path to the module into
a raw string literal sidesteps the
backslash issue in the path.

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

Reviewed by: brecht
2021-11-09 09:58:48 -07:00
Jacques Lucke
a356e4fb3f Merge branch 'blender-v3.0-release' 2021-11-09 17:53:15 +01:00
Jacques Lucke
4f246b8bf9 Fix T92908: print warning when instance recursion limit is reached
Currently we have a fixed instance recursion limit. While we want to lift this
limitation at some point, that is out of scope for a bug fix. For now just print
a warning to make it easier to detect the issue.

Differential Revision: https://developer.blender.org/D13162
2021-11-09 17:52:40 +01:00
Aaron Carlisle
7383f95443 Merge branch 'blender-v3.0-release' 2021-11-09 11:43:18 -05:00
Aaron Carlisle
74fe19b193 UI: use plural form of "Gizmo" in Gizmo display menus
Because the menus list several gizmo visibility settings it makes grammatical sense that the panel name is plural.

This also matches the "Overlays" menu.
2021-11-09 11:42:26 -05:00
Brecht Van Lommel
fd0ba6449b Cycles: mark both RDNA and RDNA2 as support for HIP 2021-11-09 17:38:25 +01:00
Hans Goudey
ed0df0f3c6 Merge branch 'blender-v3.0-release' 2021-11-09 10:15:20 -06:00
Hans Goudey
aa13c4b386 Viewport: Remove different outline color for instances
With instancing becoming more common with geometry nodes,
instances are less of a separate thing and more of an essential part
of evaluated data. Displaying them with a separate outline, while
helpful in some cases, is not worth the lack of visibility or confusion
about selected/active status. Information about the performance
of the scene due to instancing is always available with the statistics
like vertex count, etc.

The problems were compounded by the fact that the instancing
system is used to output geometry components that don't correspond
to the object's original type. So this patch also fixes that problem.

Fixes T92079, T81010
Ref T91310

Differential Revision: https://developer.blender.org/D13133
2021-11-09 10:12:05 -06:00
Philipp Oeser
e5fb5c9d7b Merge branch 'blender-v3.0-release' 2021-11-09 17:07:41 +01:00
Demeter Dzadik
e452c43fd6 Let Unlink Action operator have an undo step
I noticed while rigging a character and editing actions that the Unlink Action operator had no undo step. Doesn't feel intentional, so this patch adds the necessary flags.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D12346
2021-11-09 16:58:39 +01:00
Philipp Oeser
570331ca96 Fix T92928: Geometry nodes animation decorator wrong for vectors
Decorators were only added for the first item of an array.

Decorators for all items of an array are added:
- if the layout is flagged `UI_ITEM_PROP_DECORATE` automatically in
`uiItemFullR` or
- calling `uiItemDecoratorR` (but only in certain situations, see below)

When calling `uiItemDecoratorR` with an index of 0, the following
happens:
- the index is passed to `uiItemDecoratorR_prop`
- that checks with `ui_item_rna_is_expand` if decorators should be added
to all items of an array
- the check fails (because it only permits RNA_NO_INDEX -- which is -1)

So two things we can do:
- remain using `uiItemDecoratorR` (that would require to pass an index
of RNA_NO_INDEX -- a bad level include -- or -1
- just use `uiLayoutSetPropDecorate` to flag the row properly

This patch does later.

Differential Revision: https://developer.blender.org/D13159
2021-11-09 16:54:50 +01:00
Jacques Lucke
0bdf9d10a4 Merge branch 'blender-v3.0-release' 2021-11-09 16:46:58 +01:00
Jacques Lucke
cc949f0a40 Fix: wrong attribute propagation in Distribute node
Currently the Distribute Points on Faces node does not propagate
non-point attributes correctly. That is because it first interpolates the
attributes to the point domain on the input mesh, and then propagates them.

Differential Revision: https://developer.blender.org/D13148
2021-11-09 16:46:04 +01:00
Pablo Vazquez
fb0ae66ee5 Merge branch 'blender-v3.0-release' 2021-11-09 16:10:19 +01:00
Pablo Vazquez
368d794407 Cleanup: Remove SMALL_TRI_RIGHT_VEC icon
Since the recent change to context paths to use the arrow icon instead of the triangle (D13106),
the `SMALL_TRI_RIGHT_VEC`is no longer used. This patch removes the icon and all references.

- Replace `SMALL_TRI_RIGHT_VEC` with `RIGHTARROW` in Freestyle UI
- Remove references to `SMALL_TRI_RIGHT_VEC` and `ICON_SMALL_TRI_RIGHT_VEC`.

Fix for built-in add-ons has been done in rBAcc2f71bfe9b0/rBAa84028f8a89a.

This will be added to the list of breaking changes [[ https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes | in the Wiki ]].

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D13130
2021-11-09 16:09:53 +01:00
Brecht Van Lommel
8eff3b5fe0 Cycles: add AMD driver version info for HIP on Windows 2021-11-09 15:42:48 +01:00
Brecht Van Lommel
5f44298280 Fix T92645: Cycles OSL crash due use of uninitialized pointer
Thanks to Ilja Razinkov for identifying the problem and solution.
2021-11-09 15:29:41 +01:00
Germano Cavalcante
9dc3f454d9 Merge branch 'blender-v3.0-release' 2021-11-09 11:27:25 -03:00
Germano Cavalcante
9b2f212016 Fix T92939: Crash on drop when a curve is the active object
The active object was being set as the edited object even though it was
not in edit mode.
2021-11-09 11:26:45 -03:00