diff options
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/kernel_bvh.h | 11 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_bvh_subsurface.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_bvh_traversal.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_compat_cpu.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_film.h | 4 |
5 files changed, 13 insertions, 12 deletions
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h index 93e546eaece..17791f4f35a 100644 --- a/intern/cycles/kernel/kernel_bvh.h +++ b/intern/cycles/kernel/kernel_bvh.h @@ -235,7 +235,7 @@ ccl_device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersect int prim = kernel_tex_fetch(__prim_index, curveAddr); #ifdef __KERNEL_SSE2__ - __m128 vdir = _mm_div_ps(_mm_set1_ps(1.0f), (__m128 &)idir); + __m128 vdir = _mm_div_ps(_mm_set1_ps(1.0f), load_m128(idir)); __m128 vcurve_coef[4]; const float3 *curve_coef = (float3 *)vcurve_coef; @@ -268,10 +268,11 @@ ccl_device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersect __m128 htfm2 = shuffle<1, 3, 2, 3>(mul_shuf, vdir0); __m128 htfm[] = { htfm0, htfm1, htfm2 }; - __m128 p0 = transform_point_T3(htfm, _mm_sub_ps(P0, (__m128 &)P)); - __m128 p1 = transform_point_T3(htfm, _mm_sub_ps(P1, (__m128 &)P)); - __m128 p2 = transform_point_T3(htfm, _mm_sub_ps(P2, (__m128 &)P)); - __m128 p3 = transform_point_T3(htfm, _mm_sub_ps(P3, (__m128 &)P)); + __m128 vP = load_m128(P); + __m128 p0 = transform_point_T3(htfm, _mm_sub_ps(P0, vP)); + __m128 p1 = transform_point_T3(htfm, _mm_sub_ps(P1, vP)); + __m128 p2 = transform_point_T3(htfm, _mm_sub_ps(P2, vP)); + __m128 p3 = transform_point_T3(htfm, _mm_sub_ps(P3, vP)); float fc = 0.71f; __m128 vfc = _mm_set1_ps(fc); diff --git a/intern/cycles/kernel/kernel_bvh_subsurface.h b/intern/cycles/kernel/kernel_bvh_subsurface.h index 6b691f3364b..40683a2da57 100644 --- a/intern/cycles/kernel/kernel_bvh_subsurface.h +++ b/intern/cycles/kernel/kernel_bvh_subsurface.h @@ -49,8 +49,8 @@ ccl_device uint BVH_FUNCTION_NAME(KernelGlobals *kg, const Ray *ray, Intersectio /* ray parameters in registers */ const float tmax = ray->t; - ccl_align(16) float3 P = ray->P; - ccl_align(16) float3 idir = bvh_inverse_direction(ray->D); + float3 P = ray->P; + float3 idir = bvh_inverse_direction(ray->D); int object = ~0; float isect_t = tmax; diff --git a/intern/cycles/kernel/kernel_bvh_traversal.h b/intern/cycles/kernel/kernel_bvh_traversal.h index bfd72b0aa16..0515a9e0fa7 100644 --- a/intern/cycles/kernel/kernel_bvh_traversal.h +++ b/intern/cycles/kernel/kernel_bvh_traversal.h @@ -55,8 +55,8 @@ ccl_device bool BVH_FUNCTION_NAME /* ray parameters in registers */ const float tmax = ray->t; - ccl_align(16) float3 P = ray->P; - ccl_align(16) float3 idir = bvh_inverse_direction(ray->D); + float3 P = ray->P; + float3 idir = bvh_inverse_direction(ray->D); int object = ~0; #if FEATURE(BVH_MOTION) diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index b213e91274d..a9c66ec2d68 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -20,9 +20,9 @@ #define __KERNEL_CPU__ #include "util_debug.h" -#include "util_half.h" #include "util_math.h" #include "util_simd.h" +#include "util_half.h" #include "util_types.h" CCL_NAMESPACE_BEGIN diff --git a/intern/cycles/kernel/kernel_film.h b/intern/cycles/kernel/kernel_film.h index cbd875e994c..dc5f6e7ce38 100644 --- a/intern/cycles/kernel/kernel_film.h +++ b/intern/cycles/kernel/kernel_film.h @@ -75,7 +75,7 @@ ccl_device void kernel_film_convert_to_half_float(KernelGlobals *kg, float exposure = kernel_data.film.exposure; - ccl_align(16) float4 rgba_in = *in; + float4 rgba_in = *in; if(exposure != 1.0f) { rgba_in.x *= exposure; @@ -83,7 +83,7 @@ ccl_device void kernel_film_convert_to_half_float(KernelGlobals *kg, rgba_in.z *= exposure; } - float4_store_half(out, &rgba_in, sample_scale); + float4_store_half(out, rgba_in, sample_scale); } CCL_NAMESPACE_END |