[Bf-blender-cvs] [2f1d3ba6da1] master: Cycles: Fixed OpenCL kernel build.
Stefan Werner
noreply at git.blender.org
Thu Jan 9 14:40:43 CET 2020
Commit: 2f1d3ba6da1cf86ca3a5974e8712da14605d0a17
Author: Stefan Werner
Date: Thu Jan 9 14:40:24 2020 +0100
Branches: master
https://developer.blender.org/rB2f1d3ba6da1cf86ca3a5974e8712da14605d0a17
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.
===================================================================
M intern/cycles/kernel/kernel_passes.h
===================================================================
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);
More information about the Bf-blender-cvs
mailing list