Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-18 21:06:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-03-18 21:06:21 +0300
commita29186efb414cec130dbfe4f81173b64d37ad10a (patch)
treecb7b98c42f938050a87ddb141f8f3e1197a25f9c /intern/cycles/kernel
parentb29790a953ff0f31c431daaaa2864e48bd38e94c (diff)
parent01df4818a6e1d3b93517e48a617310481abd9339 (diff)
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/kernel_compat_opencl.h6
-rw-r--r--intern/cycles/kernel/kernel_emission.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel_compat_opencl.h b/intern/cycles/kernel/kernel_compat_opencl.h
index 3bf8cdebf4a..d3d0934a626 100644
--- a/intern/cycles/kernel/kernel_compat_opencl.h
+++ b/intern/cycles/kernel/kernel_compat_opencl.h
@@ -125,7 +125,9 @@
#define fmodf(x, y) fmod((float)(x), (float)(y))
#define sinhf(x) sinh(((float)(x)))
-#if !(defined(__KERNEL_OPENCL_AMD__) || defined(__KERNEL_OPENCL_INTEL_CPU__))
+/* Use native functions with possibly lower precision for performance,
+ * no issues found so far. */
+#if 1
# define sinf(x) native_sin(((float)(x)))
# define cosf(x) native_cos(((float)(x)))
# define tanf(x) native_tan(((float)(x)))
@@ -140,7 +142,7 @@
# define expf(x) exp(((float)(x)))
# define sqrtf(x) sqrt(((float)(x)))
# define logf(x) log(((float)(x)))
-# define rcp(x) recip(x))
+# define rcp(x) recip(x)
#endif
/* data lookup defines */
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index 9c47d1ca7be..80bb8d48caf 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -318,7 +318,7 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg,
# endif
path_state_modify_bounce(state, true);
- shader_eval_surface(kg, emission_sd, state, PATH_RAY_EMISSION);
+ shader_eval_surface(kg, emission_sd, state, state->flag | PATH_RAY_EMISSION);
path_state_modify_bounce(state, false);
L = shader_background_eval(emission_sd);