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 <brecht@blender.org>2021-11-22 22:41:19 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-22 23:02:46 +0300
commit29681f186e1a6865da0b4936805df5a608b90ee9 (patch)
treea3a4e9dc61195261c3409259dc2d1e4ddf31b976 /intern/cycles/kernel/light/light.h
parent73b1ad1920e1bfe47613744e32b67f39108df2b1 (diff)
Fix T93283: Cycles render error with CUDA CPU + GPU after recent optimization
BVH2 triangle intersection was broken on the GPU since packed floats can't be loaded directly into SSE. The better long term solution for performance would be to build a BVH2 for GPU and Embree for CPU, similar to what we do for OptiX.
Diffstat (limited to 'intern/cycles/kernel/light/light.h')
-rw-r--r--intern/cycles/kernel/light/light.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/intern/cycles/kernel/light/light.h b/intern/cycles/kernel/light/light.h
index 2e7f862a715..3f7d0e0899e 100644
--- a/intern/cycles/kernel/light/light.h
+++ b/intern/cycles/kernel/light/light.h
@@ -676,19 +676,7 @@ ccl_device_forceinline void triangle_light_sample(KernelGlobals kg,
ls->D = z * B + safe_sqrtf(1.0f - z * z) * safe_normalize(C_ - dot(C_, B) * B);
/* calculate intersection with the planar triangle */
- if (!ray_triangle_intersect(P,
- ls->D,
- FLT_MAX,
-#if defined(__KERNEL_SSE2__) && defined(__KERNEL_SSE__)
- (ssef *)V,
-#else
- V[0],
- V[1],
- V[2],
-#endif
- &ls->u,
- &ls->v,
- &ls->t)) {
+ if (!ray_triangle_intersect(P, ls->D, FLT_MAX, V[0], V[1], V[2], &ls->u, &ls->v, &ls->t)) {
ls->pdf = 0.0f;
return;
}