[Bf-blender-cvs] [d9f1f6f] soc-2016-cycles_images: Have proper declarations for half data types.
Thomas Dinges
noreply at git.blender.org
Fri Jun 17 12:47:35 CEST 2016
Commit: d9f1f6f8916e2df03a6dee5823bc40c246807dda
Author: Thomas Dinges
Date: Fri Jun 17 11:04:55 2016 +0200
Branches: soc-2016-cycles_images
https://developer.blender.org/rBd9f1f6f8916e2df03a6dee5823bc40c246807dda
Have proper declarations for half data types.
===================================================================
M intern/cycles/util/util_half.h
===================================================================
diff --git a/intern/cycles/util/util_half.h b/intern/cycles/util/util_half.h
index d652e88..24a0b18 100644
--- a/intern/cycles/util/util_half.h
+++ b/intern/cycles/util/util_half.h
@@ -27,10 +27,13 @@ CCL_NAMESPACE_BEGIN
/* Half Floats */
-/* CUDA and OpenCL have inbuilt half data types,
- * so we only need to declare them for CPU */
+/* CUDA and OpenCL have inbuilt half data type, declare for CPU */
#ifndef __KERNEL_GPU__
typedef unsigned short half;
+#endif
+
+/* OpenCL knows half4, declare for CPU and CUDA */
+#ifndef __KERNEL_OPENCL__
struct half4 { half x, y, z, w; };
#endif
More information about the Bf-blender-cvs
mailing list