From db4cb2d1eaac7e11a2616209c70778dc1df0caa6 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 1 Mar 2019 13:56:44 +0000 Subject: [PATCH] Fully initialise members in PhysicalDeviceData --- renderdoc/driver/vulkan/vk_core.h | 33 +++++++++++-------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index 6a81e0c1c..299923b72 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -331,17 +331,6 @@ private: struct PhysicalDeviceData { - PhysicalDeviceData() - : readbackMemIndex(0), uploadMemIndex(0), GPULocalMemIndex(0), props(), driverInfo(props) - { - fakeMemProps = NULL; - memIdxMap = NULL; - RDCEraseEl(features); - RDCEraseEl(memProps); - RDCEraseEl(fmtprops); - RDCEraseEl(queueProps); - } - uint32_t GetMemoryIndex(uint32_t resourceRequiredBitmask, uint32_t allocRequiredProps, uint32_t allocUndesiredProps); @@ -349,21 +338,21 @@ private: // - memory for copying into and reading back from the GPU // - memory for copying into and uploading to the GPU // - memory for sitting on the GPU and never being CPU accessed - uint32_t readbackMemIndex; - uint32_t uploadMemIndex; - uint32_t GPULocalMemIndex; + uint32_t readbackMemIndex = 0; + uint32_t uploadMemIndex = 0; + uint32_t GPULocalMemIndex = 0; - VkPhysicalDeviceMemoryProperties *fakeMemProps; - uint32_t *memIdxMap; + VkPhysicalDeviceMemoryProperties *fakeMemProps = NULL; + uint32_t *memIdxMap = NULL; - VkDriverInfo driverInfo; - VkPhysicalDeviceFeatures features; - VkPhysicalDeviceProperties props; - VkPhysicalDeviceMemoryProperties memProps; - VkFormatProperties fmtprops[VK_FORMAT_RANGE_SIZE]; + VkPhysicalDeviceFeatures features = {}; + VkPhysicalDeviceProperties props = {}; + VkPhysicalDeviceMemoryProperties memProps = {}; + VkFormatProperties fmtprops[VK_FORMAT_RANGE_SIZE] = {}; + VkDriverInfo driverInfo = VkDriverInfo(props); uint32_t queueCount = 0; - VkQueueFamilyProperties queueProps[16]; + VkQueueFamilyProperties queueProps[16] = {}; }; PFN_vkSetDeviceLoaderData m_SetDeviceLoaderData;