Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 58 / 5574

Revision 3a4c8f4 by Michael Jones / Michael Jones
November 9, 2021, 21:43 (GMT)
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
Revision 7b530c6 by Hans Goudey
November 9, 2021, 19:15 (GMT)
Fix: Incorrect assert in dot grid drawing

It's totally valid for the grid levels to be zero.
Revision 4648c49 by Hans Goudey
November 9, 2021, 19:08 (GMT)
Merge branch 'blender-v3.0-release'
Revision 44239fa by Hans Goudey
November 9, 2021, 18:59 (GMT)
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.
November 9, 2021, 16:58 (GMT)
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
November 9, 2021, 16:53 (GMT)
Merge branch 'blender-v3.0-release'
November 9, 2021, 16:52 (GMT)
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
November 9, 2021, 16:43 (GMT)
Merge branch 'blender-v3.0-release'
November 9, 2021, 16:42 (GMT)
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.
November 9, 2021, 16:38 (GMT)
Cycles: mark both RDNA and RDNA2 as support for HIP
Revision ed0df0f by Hans Goudey
November 9, 2021, 16:15 (GMT)
Merge branch 'blender-v3.0-release'
Revision aa13c4b by Hans Goudey
November 9, 2021, 16:12 (GMT)
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
November 9, 2021, 16:07 (GMT)
Merge branch 'blender-v3.0-release'
November 9, 2021, 15:58 (GMT)
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
November 9, 2021, 15:54 (GMT)
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
November 9, 2021, 15:46 (GMT)
Merge branch 'blender-v3.0-release'
November 9, 2021, 15:46 (GMT)
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
November 9, 2021, 15:10 (GMT)
Merge branch 'blender-v3.0-release'
November 9, 2021, 15:09 (GMT)
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
November 9, 2021, 14:42 (GMT)
Cycles: add AMD driver version info for HIP on Windows
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021