Rendering volume scatter with GPU OpenCL comes to an halt after a few seconds
Closed, ResolvedPublic


System Information
Operating system: Win 10 64-bit Home Edition
Graphics card: AMD ASUS R9 390X 8GB, latest drivers

Blender Version
Broken: 2.78 9d873fc

Short description of error
Rendering volume scatter with GPU OpenCL comes to an halt after a few tiles. It just stops to render but the GPU Usage hovers about 50%-60% when it stops to render.

Exact steps for others to reproduce the error

Use the BMW27.blend file from benchmark. Add a large cube that engulfs the whole scene and add a volume scatter shader in Volume. Use OpenCL GPU. Press F12. Blend updated for testing.

Cause is unsafe compiler options. Changing it to a safe one does performance penalty 1%.

1diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
2index 0328dfe..c3a499d 100644
3--- a/intern/cycles/device/opencl/opencl_base.cpp
4+++ b/intern/cycles/device/opencl/opencl_base.cpp
5@@ -612,7 +612,7 @@ void OpenCLDeviceBase::shader(DeviceTask& task)
7​ string OpenCLDeviceBase::kernel_build_options(const string *debug_src)
8​ {
9- string build_options = "-cl-fast-relaxed-math ";
10+ string build_options = "-cl-no-signed-zeros -cl-mad-enable ";
12​ if(platform_name == "NVIDIA CUDA") {
13​ build_options += "-D__KERNEL_OPENCL_NVIDIA__ "

Thanks Hristo for looking into that and giving an answer and a solution. Is there a way to enable safe compiler options from the terminal or within blender? Or is it hardcoded?