Blender Git Commits

Blender Git "tmp-2.83-cycles-rtx3-kernels" branch commits.

Page: 3 / 13

October 28, 2020, 08:49 (GMT)
Fix T81254: Incorrect calculation of EEVEE Transmittance Volumetrics

Regular rendering uses a custom blend mode, but render passes renders to
2 separate textures. This wasn't configured correctly inside the
fragment shaders. This patch adds a switch to configure the fragment
shader with the correct attachments.

Backport to Blender 2.83.

Reviewed By: Cl�ment Foucault

Differential Revision: https://developer.blender.org/D9038
October 28, 2020, 08:39 (GMT)
Fix T81688: BPY_thread_save crashes with Python 3.9

Calling PyEval_ReleaseLock() was crashing with Python 3.9
because it accessed the NULL pointer set by PyThreadState_Swap().

This happened when calling ViewLayer.update() for example.

While the existing logic could be fixed by swapping the thread-state
back before calling PyEval_ReleaseLock(), this depends on functions
which are tagged to be removed by v4.0.

Replace use of deprecated functions by calling PyEval_SaveThread(),
instead of inlining the logic, using _PyThreadState_UncheckedGet()
to prevent Python aborting.

The call to PyEval_ThreadsInitialized has been removed
as threads are now initialized with Python.
This could be replaced with Py_IsInitialized() however it doesn't look
like this is necessary.

This is compatible with Python 3.7 & 3.9.
October 28, 2020, 08:37 (GMT)
Fix T81520: Crash setting the Cycles device from Python
October 28, 2020, 08:34 (GMT)
Fix T81288:Select Linked fails with multi-object edit mode

Changing options after using select-linked didn't work
when the object being selected wasn't the active object.
October 28, 2020, 08:34 (GMT)
Fix T81854: crash when undoing switch between sculpt and edit mode.

The logic of `BKE_sculpt_update_object_for_edit` was not correct. such
low-level functions should typically never preform depsgraph evaluation
themselves, they should be able to rely on getting a fully evaluated
depsgraph and just get needed data from there.

Supporting that required fixing other broken code higher in the
callstack, namely:
* `ED_object_sculptmode_enter_ex` was freeing evaluated data, for no
valid reason it would seem.
* `sculpt_undosys_step_decode` was ensuring an evaluated depsgraph
**before** calling `ED_object_mode_generic_exit`, which would
invalidate a lot of evaluated data.

Note that it is fairly difficult to track down all code paths leading to
`BKE_sculpt_update_object_for_edit`, so there may be still cases where
this gets called with improperly evaluated depsgraph.

Reviewed By: sergey

Maniphest Tasks: T81854

Differential Revision: https://developer.blender.org/D9270
October 28, 2020, 08:26 (GMT)
Fix T81421: "Saving As..." a blend file with a Script node file path filled with 1023 symbols crashes Blender.

Usual lack of protection against buffer overflows when manipulating
strings.

Also add some basic tests for `BLI_path_rel`.
October 28, 2020, 08:26 (GMT)
Fix T81942 EEVEE: Reflection Plane glitch with low clip distances

This was happening because the raytrace was not even being performed
due to the tracing line being too small after frustum clipping.
October 28, 2020, 08:25 (GMT)
Fix T81939: crash calling bmesh.utils.vert_separate()

Missing NULL check in bmesh_kernel_vert_separate.
October 28, 2020, 08:21 (GMT)
Fix (studio-reported) Armature: bug in handling of custom bone transform.

This specific pose channel pointer was not handled at all during
rebuilding of poses, meaning that it could end up pointing at some freed
pchan.
October 28, 2020, 08:16 (GMT)
PyAPI: unregister add-ons when exiting

This lets add-on authors avoid false positive leaks when exiting.
In particular GPUShaders's although it applies to any PyObject that
stores memory allocated by guarded-alloc.

While this does add overhead on exit, on my system it's
under 1/100th of a second with all addons enabled.

See: T71362
October 28, 2020, 08:05 (GMT)
Fix T81633 Workbench: TAA never resolve when enabling both X-Ray and cavity

This was caused by a wrong flag equality check when in xray mode because
the xray mode was masking the effect option flags that are not supported
in this mode. This means the never passed and the TAA was reset before
every redraw, leading to infinite rendering.
October 28, 2020, 07:49 (GMT)
Blender v2.83.9 beta
October 21, 2020, 08:12 (GMT)
BuildBot: Select CUDA 10.1 for Blender v2.83 releases

Buildbot has multiple cuda versions installed. Master selects the right
cuda version based on the architecture that is compiled. {D9179}.
When building BlenderLTS it defaults to CUDA 11.1 what isn't able to
compile `sm_30` architecture. This patch selects CUDA 10.1 as default.
October 21, 2020, 06:22 (GMT)
Blender v2.83.8 Release
October 7, 2020, 08:22 (GMT)
Windows Release: Script creation of MSIX package

Script create_msix_package.py will download the ZIP file
from the given URL. It will create the MSIX package
with the version number and publisher ID given.

Strongly recommended are the path to a valid PFX file, and the
password to use that PFX file. These are needed for signing
the resulting MSIX package. The signing step is optional though,
but the resulting MSIX package cannot be installed outside of the
Microsoft Store

Example

set VERSION=2.83.2.0
set URL=https://download.blender.org/release/Blender2.83/blender-2.83.2-windows64.zip
set PUBID=CN=PUBIDHERE
set PFX=X:pathtocert.pfx
set PFXPW=pwhere

python create_msix_package.py --version %VERSION% --url %URL% --publisher %PUBID% --pfx %PFX% --password %PFXPW%

Requirements:
* Python default from the Microsoft Store should do (3.8)
* requests can be installed with `pip install requests`

Note that for an LTS release that gets uploaded to its own LTS application release
in the store you need to specify the `--lts` switch on the command-line to the script.

Upon completion there will be a file with the
name blender-2.83.2.0-windows64.msix. In case PFX file and its password were
given on the command line MSIX package will also be signed for the Microsoft Store.

Related Wiki page: https://wiki.blender.org/wiki/Process/Release_On_Windows_Store

Reviewed By: jbakker

Maniphest Tasks: T77348, T79356

Differential Revision: https://developer.blender.org/D8310
October 7, 2020, 08:17 (GMT)
Cycles: Fix usage of memory barriers in split kernel

On user level this fixes dead-lock of OpenCL render on Intel Iris GPUs.
Note that this patch does not include change in the logic which allows
or disallows OpenCL platforms to be used, that will happen after the
kernel fix is known to be fine for the currently officially supported
platforms.

The dead-lock was caused by wrong usage of memory barriers: as per the
OpenCL specification the barrier is to be executed by the entire work
group. This means, that the following code is invalid:

void foo() {
if (some_condition) {
return;
}
barrier(CLK_LOCAL_MEM_FENCE);
}

void bar() {
foo();
}

The Cycles code was mentioning this as an invalid code on CPU, while in
fact this is invalid as per specification. From the implementation side
this change removes the ifdefs around the CPU-only barrier logic, and
is implementing similar logic in the shader setup kernel.

Tested on NUC8i7HVK NUC.

The root cause of the dead-lock was identified by Max Dmitrichenko.

There is no measurable difference in performance of currently supported
OpenCL platforms.

Differential Revision: https://developer.blender.org/D9039
October 7, 2020, 08:17 (GMT)
Fix T81459: Memory Leak Cycles Rendered Viewport

The external engine in the draw manager wasn't registered correctly.
This did not free the resources after the external engine was used.
October 7, 2020, 08:15 (GMT)
Fix T81218: Crash in pose mode using a driver on bendy bone Segment

The example file in T81218 has a driver that maps a bone's X-location to
the number of BBone segments. This caused a dependency cycle, which
resulted in bad thread serialisation, which caused the crash.

This patch breaks the dependency cycle `BONE_LOCAL` ?
`DRIVER(bones["Bone"].bbone_segments)` ? `BONE_LOCAL`. The 'Driver Data'
relation now points to `BONE_SEGMENTS` when the driven property starts
with `bbone_`.

Differential Revision: https://developer.blender.org/D9122
October 7, 2020, 08:10 (GMT)
Fix T80885: Texture paint camera project crashes after undo/redo

Unmatched ED_image_undo_push_{begin/end},
add doc-strings noting why this is needed.

Thanks to @Baardaap for the initial fix.
October 7, 2020, 08:06 (GMT)
Fix T80630: potential crash in volume grids in Eevee shaders

Found by address sanitizer.
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021