Skip to content

Commit

Permalink
Zero-initialise struct
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Dec 12, 2024
1 parent 3a91874 commit beda659
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions renderdoc/driver/vulkan/vk_acceleration_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@ struct VkAccelerationStructureInfo
{
struct Triangles
{
VkFormat vertexFormat;
VkDeviceSize vertexStride;
uint32_t maxVertex;
VkIndexType indexType;
VkFormat vertexFormat = VK_FORMAT_UNDEFINED;
VkDeviceSize vertexStride = 0;
uint32_t maxVertex = 0;
VkIndexType indexType = VK_INDEX_TYPE_NONE_KHR;
};

struct Aabbs
{
VkDeviceSize stride;
VkDeviceSize stride = 0;
};

VkGeometryTypeKHR geometryType = VK_GEOMETRY_TYPE_TRIANGLES_KHR;
VkGeometryFlagsKHR flags;
VkGeometryFlagsKHR flags = 0;

Triangles tris;
Aabbs aabbs;

VkAccelerationStructureBuildRangeInfoKHR buildRangeInfo;
VkDeviceSize memOffset;
VkAccelerationStructureBuildRangeInfoKHR buildRangeInfo = {};
VkDeviceSize memOffset = 0;
};

~VkAccelerationStructureInfo();
Expand Down

0 comments on commit beda659

Please sign in to comment.