From 44f77bd5a4a2580662af5fd3a20c7af75bce88e1 Mon Sep 17 00:00:00 2001 From: Stefan Zellmann Date: Thu, 14 Nov 2024 17:57:35 +0100 Subject: [PATCH] Don't default-init dco arrays --- DeviceCopyableObjects.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/DeviceCopyableObjects.h b/DeviceCopyableObjects.h index d75bb583..f9dc1932 100644 --- a/DeviceCopyableObjects.h +++ b/DeviceCopyableObjects.h @@ -1397,8 +1397,8 @@ inline hit_record> intersect(const Ray &ray, const BLS struct Array { - const void *data{nullptr}; - size_t len{0}; + const void *data; + size_t len; TypeInfo typeInfo; }; @@ -1412,10 +1412,10 @@ enum class Attribute struct Instance { enum Type { Transform, MotionTransform, Unknown, }; - Type type{Unknown}; - unsigned instID{UINT_MAX}; - unsigned userID{UINT_MAX}; - unsigned groupID{UINT_MAX}; + Type type; + unsigned instID; + unsigned userID; + unsigned groupID; #ifdef WITH_CUDA cuda_index_bvh::bvh_ref theBVH; #elif defined(WITH_HIP) @@ -1435,6 +1435,7 @@ inline Instance createInstance() { Instance inst; memset(&inst,0,sizeof(inst)); + inst.type = Instance::Unknown; inst.instID = UINT_MAX; inst.userID = UINT_MAX; inst.groupID = UINT_MAX;