diff --git a/src/amd/vulkan/bvh/ploc_internal.comp b/src/amd/vulkan/bvh/ploc_internal.comp index 6bf74960de7..68f5db0c2d6 100644 --- a/src/amd/vulkan/bvh/ploc_internal.comp +++ b/src/amd/vulkan/bvh/ploc_internal.comp @@ -198,6 +198,9 @@ combined_node_cost(uint32_t lds_base, uint32_t i, uint32_t j) combined_bounds.max = max(shared_bounds[i - lds_base].max, shared_bounds[j - lds_base].max); float area = aabb_surface_area(combined_bounds); + if (area == 0.0) + return 0.0; + /* p_a and p_b are the probabilities that i or j are hit by a ray: * Assuming that the current node is hit (p = 1) and the probability of hitting a node * is proportional to its surface area, p = area * c with p = 1 for the current node.