Fix #35804: NVidia OpenCL render issue after sampler changes, workaround what looks like a compiler bug.

This commit is contained in:
Brecht Van Lommel
2013-06-21 12:34:34 +00:00
parent 2df82a2a2b
commit e1f79351d6
2 changed files with 18 additions and 2 deletions

View File

@@ -125,9 +125,9 @@ __device_inline float path_rng_1D(KernelGlobals *kg, RNG *rng, int sample, int n
float shift;
if(dimension & 1)
shift = (*rng >> 16)/((float)0xFFFF);
shift = (*rng >> 16) * (1.0f/(float)0xFFFF);
else
shift = (*rng & 0xFFFF)/((float)0xFFFF);
shift = (*rng & 0xFFFF) * (1.0f/(float)0xFFFF);
return r + shift - floorf(r + shift);
#endif