diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-30 14:33:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-08 16:00:48 +0300 |
commit | 04cf1538b5900f9f7eda1c338f15a8a5fe662529 (patch) | |
tree | 7cb9c8cbb61514a20695934005f077a2fba7b11a /intern/cycles/kernel/bvh | |
parent | 31a025f51e635febb85c47c05d185a716687e898 (diff) |
Cycles: Fix compilation error on OpenCL
Diffstat (limited to 'intern/cycles/kernel/bvh')
-rw-r--r-- | intern/cycles/kernel/bvh/bvh.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h index 2667f236064..2055746a68d 100644 --- a/intern/cycles/kernel/bvh/bvh.h +++ b/intern/cycles/kernel/bvh/bvh.h @@ -357,7 +357,7 @@ ccl_device_inline float3 ray_offset(float3 P, float3 Ng) #endif } -#if defined(__SHADOW_RECORD_ALL__) || defined(__VOLUME_RECORD_ALL__) +#if defined(__VOLUME_RECORD_ALL__) || (defined(__SHADOW_RECORD_ALL__) && defined(__KERNEL_CPU__)) /* ToDo: Move to another file? */ ccl_device int intersections_compare(const void *a, const void *b) { @@ -371,7 +371,9 @@ ccl_device int intersections_compare(const void *a, const void *b) else return 0; } +#endif +#if defined(__SHADOW_RECORD_ALL__) ccl_device_inline void sort_intersections(Intersection *hits, uint num_hits) { #ifdef __KERNEL_GPU__ @@ -380,7 +382,7 @@ ccl_device_inline void sort_intersections(Intersection *hits, uint num_hits) for(i = 0; i < num_hits; ++i) { for(j = 0; j < num_hits - 1; ++j) { if(hits[j].t < hits[j + 1].t) { - Intersection tmp = hits[j]; + struct Intersection tmp = hits[j]; hits[j] = hits[j + 1]; hits[j + 1] = tmp; } |