Fix T41601: Correlated multi-jitter with high samples "hangs"
Issue was caused by the precision issues which made sdivm by 1 under it's actual value. We can try to do some eps magic, but from the tests on laptop and desktop doing integer division is not slower than using floats here.
This commit is contained in:
@@ -182,7 +182,8 @@ ccl_device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy)
|
||||
smodm = cmj_fast_mod_pow2(s, m);
|
||||
}
|
||||
else {
|
||||
sdivm = float_to_int(s * invm);
|
||||
/* Doing s*inmv gives precision issues here. */
|
||||
sdivm = s / m;
|
||||
smodm = s - sdivm*m;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user