[Bf-blender-cvs] [4e5bf6718e8] temp-studio-sprite-fright-cycles: Fix Cycles use of uninitialized value in volume stack intersection on CPU
Brecht Van Lommel
noreply at git.blender.org
Wed Sep 29 17:18:23 CEST 2021
Commit: 4e5bf6718e8302dc22a225dc1d150c6d26e32ee4
Author: Brecht Van Lommel
Date: Wed Sep 29 16:14:38 2021 +0200
Branches: temp-studio-sprite-fright-cycles
https://developer.blender.org/rB4e5bf6718e8302dc22a225dc1d150c6d26e32ee4
Fix Cycles use of uninitialized value in volume stack intersection on CPU
Could cause an actual bug but probability is low in practice.
===================================================================
M intern/cycles/bvh/bvh_embree.cpp
===================================================================
diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
index 62f543941a9..f14d30065e3 100644
--- a/intern/cycles/bvh/bvh_embree.cpp
+++ b/intern/cycles/bvh/bvh_embree.cpp
@@ -190,7 +190,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. */
More information about the Bf-blender-cvs
mailing list