From 17ddca5017d6ef502e5ffbeaf9dd315346c18bf4 Mon Sep 17 00:00:00 2001 From: salipourto Date: Thu, 12 Sep 2024 16:47:13 +0200 Subject: [PATCH] Fix #127240: Deforming motion blurred point clouds do not render under certain conditions Deforming motion blurred point clouds do not render in Cycles HIP-RT when BVH timesteps != 0 if Blender is launched with debug memory. The root cause is that the size of allocated memory for the bounding boxes is reported to HIP-RT not the number of valid bounding boxes. Pull Request: https://projects.blender.org/blender/blender/pulls/127432 --- intern/cycles/device/hiprt/device_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/intern/cycles/device/hiprt/device_impl.cpp b/intern/cycles/device/hiprt/device_impl.cpp index b57457ffe9a..bc402453ff4 100644 --- a/intern/cycles/device/hiprt/device_impl.cpp +++ b/intern/cycles/device/hiprt/device_impl.cpp @@ -452,7 +452,7 @@ hiprtGeometryBuildInput HIPRTDevice::prepare_triangle_blas(BVHHIPRT *bvh, Mesh * } } - bvh->custom_prim_aabb.aabbCount = bvh->custom_primitive_bound.size(); + bvh->custom_prim_aabb.aabbCount = num_bounds; bvh->custom_prim_aabb.aabbStride = sizeof(BoundBox); bvh->custom_primitive_bound.copy_to_device(); bvh->custom_prim_aabb.aabbs = (void *)bvh->custom_primitive_bound.device_pointer; @@ -726,7 +726,7 @@ hiprtGeometryBuildInput HIPRTDevice::prepare_point_blas(BVHHIPRT *bvh, PointClou } } - bvh->custom_prim_aabb.aabbCount = bvh->custom_primitive_bound.size(); + bvh->custom_prim_aabb.aabbCount = num_bounds; bvh->custom_prim_aabb.aabbStride = sizeof(BoundBox); bvh->custom_primitive_bound.copy_to_device(); bvh->custom_prim_aabb.aabbs = (void *)bvh->custom_primitive_bound.device_pointer;