diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-21 15:51:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-21 15:51:18 +0300 |
commit | 6f48bfc7a872c106e631cda0e23d2f61d6d944d2 (patch) | |
tree | 563c36ee64fe3bd56f2dfda322ea6a79a33bea47 | |
parent | 65143542af499c026645823d3e5e0f0302fae636 (diff) |
Cycles: Cleanup, use utility function
Replaces inlined platform-specific code.
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle_intersect.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h index 558f08205a2..fa686d8a223 100644 --- a/intern/cycles/kernel/geom/geom_triangle_intersect.h +++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h @@ -234,12 +234,7 @@ ccl_device_inline int ray_triangle_intersect8( if((mask_final & prim_num_mask) == 0) { return false; } - unsigned long i = 0; -#if defined(_MSC_VER) - unsigned char res = _BitScanForward(&i, (unsigned long)mask_final); -#else - i = __builtin_ffs(mask_final)-1; -#endif + const int i = __bsf(mask_final); __m256 inv_den_256 = _mm256_rcp_ps(den_256); U_256 = _mm256_mul_ps(U_256, inv_den_256); V_256 = _mm256_mul_ps(V_256, inv_den_256); |