From 2f1d3ba6da1cf86ca3a5974e8712da14605d0a17 Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Thu, 9 Jan 2020 14:40:24 +0100 Subject: Cycles: Fixed OpenCL kernel build. transform_direction() can't handle parameters in constant address space. Creating a local copy of the parameter satisfies the OpenCL compiler. CUDA and CPU compilers should be able to optimize this away I hope. --- intern/cycles/kernel/kernel_passes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intern') diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 7841d3a5e09..d372a4f3e61 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -93,7 +93,8 @@ ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg, } /* Transform normal into camera space. */ - normal = transform_direction(&kernel_data.cam.worldtocamera, normal); + const Transform worldtocamera = kernel_data.cam.worldtocamera; + normal = transform_direction(&worldtocamera, normal); L->denoising_normal += ensure_finite3(state->denoising_feature_weight * normal); L->denoising_albedo += ensure_finite3(state->denoising_feature_weight * albedo); -- cgit v1.2.3