Bugfix [#30835]: Cycles doesn't work with AMD Juniper GPU, compiller throws errors...
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 9 Apr 2012 15:31:31 +0000 (15:31 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 9 Apr 2012 15:31:31 +0000 (15:31 +0000)
Problem: AMD does not like something like this.
float3 *a;
flaot b = a->x;

You need to circumvent this by using:
float3 *a;
float b = (*a).x;

intern/cycles/kernel/kernel_accumulate.h

index a78cfc4dfb761f6fbdb1a74b53f427a38edc10cb..9a52531eec006f214c61081831566c1c8a11f20b 100644 (file)
@@ -296,7 +296,7 @@ __device_inline float3 path_radiance_sum(PathRadiance *L)
 
 __device_inline void path_radiance_clamp(PathRadiance *L, float3 *L_sum, float clamp)
 {
-       float sum = fabsf(L_sum->x) + fabsf(L_sum->y) + fabsf(L_sum->z);
+       float sum = fabsf((*L_sum).x) + fabsf((*L_sum).y) + fabsf((*L_sum).z);
 
        if(!isfinite(sum)) {
                /* invalid value, reject */