blender/intern
Sergey Sharybin 23bf3b09dd 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
2020-10-07 10:17:56 +02:00
..
atomic Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
audaspace Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
clog Fix T78730: CLOG writes/reads outside allocated memory. 2020-08-12 09:01:49 +02:00
cycles Cycles: Fix usage of memory barriers in split kernel 2020-10-07 10:17:56 +02:00
dualcon Fix build WITH_CXX_GUARDEDALLOC 2020-03-19 14:42:04 -03:00
eigen Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
ffmpeg Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
ghost Fix T77900: File Browser in macOS fullscreen crashes 2020-09-02 14:58:42 +02:00
glew-mx
guardedalloc MEM_guardedalloc: allow freeing const arrays with MEM_SAFE_FREE 2020-08-26 11:00:53 +02:00
iksolver Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
itasc
libc_compat Build: change libc compatibility code to only be used for new glibc 2020-02-27 12:52:19 +01:00
libmv Libmv: Use static scheduler for threading 2020-04-06 15:18:32 +02:00
locale Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
mantaflow Fix T76812: [Mantaflow] Inflow particles not continuous 2020-05-19 21:12:30 +02:00
memutil Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
mikktspace Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
numaapi Fix numaapi on PowerPC platforms 2020-01-15 11:18:24 +01:00
opencolorio Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
opensubdiv Fix: build error due to missing definitions 2020-05-19 17:36:40 +02:00
openvdb Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
quadriflow Cleanup: cmake indentation 2020-03-04 11:02:35 +11:00
rigidbody Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
string Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
utfconv Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
CMakeLists.txt Build: add compatibility between precompiled libraries and new glibc 2020-02-26 18:13:14 +01:00