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.
This commit is contained in:
Stefan Werner 2020-01-09 14:40:24 +01:00
parent 2eafae4e39
commit 2f1d3ba6da
1 changed files with 2 additions and 1 deletions

View File

@ -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);