Skip to content

Commit beda659

Browse files
committed
Zero-initialise struct
1 parent 3a91874 commit beda659

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

renderdoc/driver/vulkan/vk_acceleration_structure.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@ struct VkAccelerationStructureInfo
3535
{
3636
struct Triangles
3737
{
38-
VkFormat vertexFormat;
39-
VkDeviceSize vertexStride;
40-
uint32_t maxVertex;
41-
VkIndexType indexType;
38+
VkFormat vertexFormat = VK_FORMAT_UNDEFINED;
39+
VkDeviceSize vertexStride = 0;
40+
uint32_t maxVertex = 0;
41+
VkIndexType indexType = VK_INDEX_TYPE_NONE_KHR;
4242
};
4343

4444
struct Aabbs
4545
{
46-
VkDeviceSize stride;
46+
VkDeviceSize stride = 0;
4747
};
4848

4949
VkGeometryTypeKHR geometryType = VK_GEOMETRY_TYPE_TRIANGLES_KHR;
50-
VkGeometryFlagsKHR flags;
50+
VkGeometryFlagsKHR flags = 0;
5151

5252
Triangles tris;
5353
Aabbs aabbs;
5454

55-
VkAccelerationStructureBuildRangeInfoKHR buildRangeInfo;
56-
VkDeviceSize memOffset;
55+
VkAccelerationStructureBuildRangeInfoKHR buildRangeInfo = {};
56+
VkDeviceSize memOffset = 0;
5757
};
5858

5959
~VkAccelerationStructureInfo();

0 commit comments

Comments
 (0)