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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:56:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:56:38 +0300
commit2840a5de8f26835df8e8a43972fd3eb2bae0ef73 (patch)
tree7c22a3418c39054c874147c7976adf29ef4870f3
parent7f4479da425b2d44a585f1b7b63f91d9dfecef02 (diff)
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.
-rw-r--r--intern/cycles/kernel/kernel_types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 303a78d8ac0..d8c47e48702 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;