diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-09-29 20:52:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-09-29 21:17:57 +0300 |
commit | 315246b7ce120b8f42ecae74dfe378fe58a57262 (patch) | |
tree | 970010f7468cd3f3f68344a74d316dda417e76a3 | |
parent | 3172aa9ac5f4290a73c3031de914a837689a5942 (diff) |
Fix Cycles use of uninitialized value in shadow stack intersection on CPU
The patch is against the studio branch. In the master branch it got
fixed with the Cycles X merge.
Differential Revision: https://developer.blender.org/D12705
-rw-r--r-- | intern/cycles/bvh/bvh_embree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp index f14d30065e3..0089394103c 100644 --- a/intern/cycles/bvh/bvh_embree.cpp +++ b/intern/cycles/bvh/bvh_embree.cpp @@ -81,7 +81,7 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments *args) if (ctx->num_hits < ctx->max_hits) { Intersection current_isect; kernel_embree_convert_hit(kg, ray, hit, ¤t_isect); - for (size_t i = 0; i < ctx->max_hits; ++i) { + for (size_t i = 0; i < ctx->num_hits; ++i) { if (current_isect.object == ctx->isect_s[i].object && current_isect.prim == ctx->isect_s[i].prim && current_isect.t == ctx->isect_s[i].t) { /* This intersection was already recorded, skip it. */ |