Cycles: Cleanup, use utility function

Replaces inlined platform-specific code.
This commit is contained in:
Sergey Sharybin 2018-11-21 13:51:18 +01:00
parent 65143542af
commit 6f48bfc7a8
1 changed files with 1 additions and 6 deletions

View File

@ -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);