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:
@@ -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
|
||||
|
Reference in New Issue
Block a user