[Bf-blender-cvs] [107f1c0a2b0] master: Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).
Alex Fuller
noreply at git.blender.org
Mon Sep 3 12:16:56 CEST 2018
Commit: 107f1c0a2b0dec16adb729801cc03614acc7ab82
Author: Alex Fuller
Date: Mon Sep 3 11:11:45 2018 +0200
Branches: master
https://developer.blender.org/rB107f1c0a2b0dec16adb729801cc03614acc7ab82
Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).
Differential Revision: https://developer.blender.org/D3669
===================================================================
M intern/cycles/device/opencl/opencl_base.cpp
===================================================================
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 69a2bd7adcb..cc887134bb0 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -1179,8 +1179,13 @@ string OpenCLDeviceBase::kernel_build_options(const string *debug_src)
build_options += "-g -s \"" + *debug_src + "\" ";
}
- if(OpenCLInfo::use_debug())
+ if(info.has_half_images) {
+ build_options += "-D__KERNEL_CL_KHR_FP16__ ";
+ }
+
+ if(OpenCLInfo::use_debug()) {
build_options += "-D__KERNEL_OPENCL_DEBUG__ ";
+ }
#ifdef WITH_CYCLES_DEBUG
build_options += "-D__KERNEL_DEBUG__ ";
More information about the Bf-blender-cvs
mailing list