Fix T46671: Cycles assert with CMJ sample function

With current formulation of cmj_fast_div_pow2() it should always return 0
in the case of first argument is zero and no assert really needed anymore.
This commit is contained in:
Sergey Sharybin 2015-11-03 18:44:33 +05:00
parent 268538853c
commit 537bd0eb51
Notes: blender-bot 2023-02-14 08:28:44 +01:00
Referenced by issue #46671, Cycles assert w/ CMJ sample function
1 changed files with 1 additions and 2 deletions

View File

@ -34,10 +34,9 @@ ccl_device_inline int cmj_fast_mod_pow2(int a, int b)
return (a & (b - 1));
}
/* a must be > 0 and b must be > 1 */
/* b must be > 1 */
ccl_device_inline int cmj_fast_div_pow2(int a, int b)
{
kernel_assert(a > 0);
kernel_assert(b > 1);
#if defined(__KERNEL_SSE2__)
# ifdef _MSC_VER