Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHristo Gueorguiev <prem.nirved@gmail.com>2017-04-25 21:10:51 +0300
committerHristo Gueorguiev <prem.nirved@gmail.com>2017-04-25 21:10:51 +0300
commite91dc3a97c0ce1951ce76790210f7197ab9e014a (patch)
tree1bd7598725bff32661061a966332d243f9e32692 /intern/cycles/device/opencl/opencl_base.cpp
parent9d26e32ea28b35bf51b27828f7b58fe479a29a68 (diff)
Cycles: use safe compiler flags for OpenCL.
Using -cl-fast-relaxed-math assumes no NaN/Inf values in any expression. This causes problems on overflow, division by zero, square root of negative number. Comparisons with NaN or infinite value are affected as well. This patch causes <2% slowdown on benchmark scenes. Fix T50985: Rendering volume scatter with GPU OpenCL comes to an halt after a few seconds
Diffstat (limited to 'intern/cycles/device/opencl/opencl_base.cpp')
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 52d0662a8e3..22aeaddcde8 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -612,7 +612,7 @@ void OpenCLDeviceBase::shader(DeviceTask& task)
string OpenCLDeviceBase::kernel_build_options(const string *debug_src)
{
- string build_options = "-cl-fast-relaxed-math ";
+ string build_options = "-cl-no-signed-zeros -cl-mad-enable ";
if(platform_name == "NVIDIA CUDA") {
build_options += "-D__KERNEL_OPENCL_NVIDIA__ "