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.
This commit is contained in:
Sergey Sharybin 2015-05-09 19:56:38 +05:00
parent 7f4479da42
commit 2840a5de8f

@ -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;