Cycles: fix rendering with Nishita Sky Texture on Intel Arc GPUs
Speckles and missing lights were experienced in scenes with Nishita Sky Texture and a Sun Size smaller than 1.5°, such as in Lone Monk and Attic scenes. Increasing the precision of cosf fixes it.
This commit is contained in:
@@ -195,7 +195,15 @@ using sycl::half;
|
||||
#define fmodf(x, y) sycl::fmod((x), (y))
|
||||
#define lgammaf(x) sycl::lgamma((x))
|
||||
|
||||
#define cosf(x) sycl::native::cos(((float)(x)))
|
||||
/* sycl::native::cos precision is not sufficient and -ffast-math lets
|
||||
* the current DPC++ compiler overload sycl::cos with it.
|
||||
* We work around this issue by directly calling the spirv implementation which
|
||||
* provides greater precision. */
|
||||
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SPIR__)
|
||||
# define cosf(x) __spirv_ocl_cos(((float)(x)))
|
||||
#else
|
||||
# define cosf(x) sycl::cos(((float)(x)))
|
||||
#endif
|
||||
#define sinf(x) sycl::native::sin(((float)(x)))
|
||||
#define powf(x, y) sycl::native::powr(((float)(x)), ((float)(y)))
|
||||
#define tanf(x) sycl::native::tan(((float)(x)))
|
||||
|
Reference in New Issue
Block a user