Cycles: fixes to make CUDA 4.2 work, compiling gave errors in shadows and
other places, was mainly due to instancing not working, but also found issues in procedural textures. The problem was with --use_fast_math, this seems to now have way lower precision for some operations. Disabled this flag and selectively use fast math functions. Did not find performance regression on GTX 460 after doing this.
This commit is contained in:
@@ -62,5 +62,15 @@ typedef texture<uchar4, 2, cudaReadModeNormalizedFloat> texture_image_uchar4;
|
||||
|
||||
#define kernel_data __data
|
||||
|
||||
/* Use fast math functions */
|
||||
|
||||
#define cosf(x) __cosf(((float)x))
|
||||
#define sinf(x) __sinf(((float)x))
|
||||
#define powf(x, y) __powf(((float)x), ((float)y))
|
||||
#define cosf(x) __cosf(((float)x))
|
||||
#define tanf(x) __tanf(((float)x))
|
||||
#define logf(x) __logf(((float)x))
|
||||
#define expf(x) __expf(((float)x))
|
||||
|
||||
#endif /* __KERNEL_COMPAT_CUDA_H__ */
|
||||
|
||||
|
Reference in New Issue
Block a user