[Bf-blender-cvs] [2840a5d] master: Cycles: Workaround for AMD compiler crashing building the split kernel
Sergey Sharybin
noreply at git.blender.org
Sat May 9 16:57:51 CEST 2015
Commit: 2840a5de8f26835df8e8a43972fd3eb2bae0ef73
Author: Sergey Sharybin
Date: Sat May 9 19:56:38 2015 +0500
Branches: master
https://developer.blender.org/rB2840a5de8f26835df8e8a43972fd3eb2bae0ef73
Cycles: Workaround for AMD compiler crashing building the split kernel
It's a but in compiler but it's nice to have working kernel for until
that bug is fixed.
===================================================================
M intern/cycles/kernel/kernel_types.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 303a78d..d8c47e4 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -470,11 +470,27 @@ typedef struct differential {
/* Ray */
typedef struct Ray {
+/* TODO(sergey): This is only needed because current AMD
+ * compilet has hard time bulding the kernel with this
+ * reshuffle. And at the same time reshuffle will cause
+ * less optimal CPU code in certain places.
+ *
+ * We'll get rid of this nasty eception once AMD compiler
+ * is fixed.
+ */
+#ifndef __KERNEL_OPENCL_AMD__
float3 P; /* origin */
float3 D; /* direction */
float t; /* length of the ray */
float time; /* time (for motion blur) */
+#else
+ float t; /* length of the ray */
+ float time; /* time (for motion blur) */
+ float3 P; /* origin */
+ float3 D; /* direction */
+#endif
+
#ifdef __RAY_DIFFERENTIALS__
differential3 dP;
differential3 dD;
More information about the Bf-blender-cvs
mailing list