blender/intern
Sergey Sharybin ecdfb465cc 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-09-30 16:10:35 +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 Cleanup: spelling 2020-09-15 10:23:41 +10:00
cycles Cycles: Fix usage of memory barriers in split kernel 2020-09-30 16:10:35 +02:00
dualcon Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00
eigen Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
ffmpeg Tests: bundle tests for some modules in their own executables 2020-09-17 12:29:19 +02:00
ghost Cleanup: convert gforge task ID's to phabricator format 2020-09-30 20:11:06 +10:00
glew-mx Cleanup: GPUState: Remove stack from the state manager and rename it 2020-08-18 21:30:10 +02:00
guardedalloc Cleanup: use parenthesis for if statements in macros 2020-09-19 16:28:17 +10:00
iksolver Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
itasc Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
libc_compat Build: add more libc compatibility functions for upcoming libraries update 2020-07-09 18:10:05 +02:00
libmv Tracking: Implement Brown-Conrady distortion model 2020-09-30 15:54:24 +02:00
locale Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
mantaflow Fluid: Fix for script export (standalone mode) 2020-09-22 14:02:53 +02:00
memutil Cleanup: use C style doxygen comments 2020-09-12 16:33:34 +10:00
mikktspace Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
numaapi Cleanup: use angle-brackets for email addresses 2020-09-30 12:05:56 +10:00
opencolorio Cleanup: consistent TODO/FIXME formatting for names 2020-09-19 14:34:32 +10:00
opensubdiv Cleanup: spelling 2020-09-24 14:27:48 +10:00
openvdb Cleanup: remove dead code in point cache and openvdb wrapper 2020-09-23 14:57:41 +02:00
quadriflow Quadriflow: Fix compilation error with C++17 2020-06-19 12:02:21 +02:00
rigidbody Fix missing "extern_bullet" library when building rigidbodies 2020-09-02 19:44:29 +02:00
sky Merge branch 'blender-v2.90-release' 2020-08-10 18:30:53 +02:00
utfconv Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
CMakeLists.txt Tests: move remaining gtests into their own module folders 2020-08-10 18:14:00 +02:00