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:
authorStefan Werner <stefan.werner@tangent-animation.com>2018-07-06 12:42:34 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2018-07-06 12:42:34 +0300
commitdf30b50f2f5ee66e055fc795fea91c0f7f4954d5 (patch)
tree4fe16bd326c1592c9637d168b4055e546fe12c18 /intern/cycles/kernel/kernel_compat_opencl.h
parentd20d2bcb7fe76a5a8241eefb2f2f3374e4d101bd (diff)
Cycles: Enabled half precision textures for OpenCL devices that support the cl_khr_fp16 extension.
Diffstat (limited to 'intern/cycles/kernel/kernel_compat_opencl.h')
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 438c819eec6..d1ae10a0384 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -150,6 +150,11 @@
/* define NULL */
#define NULL 0
+/* enable extensions */
+#ifdef __KERNEL_CL_KHR_FP16__
+#pragma OPENCL EXTENSION cl_khr_fp16 : enable
+#endif
+
#include "util/util_half.h"
#include "util/util_types.h"