Blender Git Loki

Git Commits -> Revision 23bf3b0

Revision 23bf3b0 by Sergey Sharybin (blender-v2.83-release, tmp-2.83-cycles-rtx3-kernels)
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

Commit Details:

Full Hash: 23bf3b09ddf3a02fef238551b8d4e60e72ff08fa
Parent Commit: dac242b
Lines Changed: +9, -50

3 Modified Paths:

/intern/cycles/kernel/split/kernel_buffer_update.h (+0, -19) (Diff)
/intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h (+0, -19) (Diff)
/intern/cycles/kernel/split/kernel_shader_setup.h (+9, -12) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021