Skip to content

Commit

Permalink
Don't default-init dco arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
szellmann committed Nov 14, 2024
1 parent 360b1f6 commit 44f77bd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions DeviceCopyableObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,8 @@ inline hit_record<Ray, primitive<unsigned>> intersect(const Ray &ray, const BLS

struct Array
{
const void *data{nullptr};
size_t len{0};
const void *data;
size_t len;
TypeInfo typeInfo;
};

Expand All @@ -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<BLS>::bvh_ref theBVH;
#elif defined(WITH_HIP)
Expand All @@ -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;
Expand Down

0 comments on commit 44f77bd

Please sign in to comment.