Fix Cycles half float pragma for strict OpenCL compilers (like ROCm).

Differential Revision: https://developer.blender.org/D3669
This commit is contained in:
Alex Fuller 2018-09-03 11:11:45 +02:00 committed by Brecht Van Lommel
parent 7ff1750218
commit 107f1c0a2b
1 changed files with 6 additions and 1 deletions

View File

@ -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__ ";