diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-23 14:41:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-23 19:45:19 +0300 |
commit | e8ff06186ee031e67e554467ced7cd16ac34af94 (patch) | |
tree | fc546eef9ab6a9a50619d0860cc478af1fb1905b /intern/cycles/kernel/geom/geom_triangle_intersect.h | |
parent | 5c06ff8bb96d014dda33874d357ecb4652558998 (diff) |
Cycles: Cleanup, inline AVX register construction from kernel global data
Currently should be no functional changes, preparing for some upcoming refactor.
Diffstat (limited to 'intern/cycles/kernel/geom/geom_triangle_intersect.h')
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle_intersect.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h index 4d234dd62bd..4f4ee93c077 100644 --- a/intern/cycles/kernel/geom/geom_triangle_intersect.h +++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h @@ -123,8 +123,9 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, #if defined(__KERNEL_AVX2__) && defined(__KERNEL_SSE__) const avxf avxf_P(P.m128, P.m128); - const avxf tri_ab = kernel_tex_fetch_avxf(__prim_tri_verts, tri_vindex + 0); - const avxf tri_bc = kernel_tex_fetch_avxf(__prim_tri_verts, tri_vindex + 1); + const ssef *ssef_verts = (ssef*)&kg->__prim_tri_verts.data[tri_vindex]; + const avxf tri_ab = _mm256_loadu_ps((float *)(ssef_verts)); + const avxf tri_bc = _mm256_loadu_ps((float *)(ssef_verts + 1)); const avxf AB = tri_ab - avxf_P; const avxf BC = tri_bc - avxf_P; |