Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 3 Sep 2018 13:33:07 +0000 (15:33 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 3 Sep 2018 13:33:07 +0000 (15:33 +0200)
intern/cycles/device/opencl/opencl_base.cpp
source/blender/blenkernel/intern/collision.c

index 69a2bd7adcb9192141fc6797e36d21b0e2a5624c..cc887134bb05ba37f67cc60af7e323b159e46220 100644 (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__ ";
index 0ba30fedc325ea4c6c92221011f9eb09c6a060ac..d3aa52509557f33482a950467052076353ee5b9c 100644 (file)
@@ -1365,6 +1365,7 @@ void cloth_find_point_contacts(Depsgraph *depsgraph, Object *ob, ClothModifierDa
        if (!collobjs) {
                *r_collider_contacts = NULL;
                *r_totcolliders = 0;
+               BLI_bvhtree_free(cloth_bvh);
                return;
        }