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
path: root/intern
diff options
context:
space:
mode:
authorStefan Werner <stefan.werner@tangent-animation.com>2020-01-09 16:40:24 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2020-01-09 16:40:24 +0300
commit2f1d3ba6da1cf86ca3a5974e8712da14605d0a17 (patch)
tree36a33b57439501472451183f86091b2346b0ac00 /intern
parent2eafae4e393d508d59ff5ab81072e61360c81e6f (diff)
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.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/kernel_passes.h3
1 files changed, 2 insertions, 1 deletions
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);