From 2e8f29b8ff580384a4b461b19d75a4cca6115845 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 3 Oct 2016 14:12:59 +1300 Subject: layers: Use safe_VkSwapchainCreateInfoKHR in CV Signed-off-by: Chris Forbes --- layers/core_validation_types.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h index 05f05f24..8fef5c54 100644 --- a/layers/core_validation_types.h +++ b/layers/core_validation_types.h @@ -255,17 +255,10 @@ struct DEVICE_MEM_INFO : public BASE_NODE { class SWAPCHAIN_NODE { public: - VkSwapchainCreateInfoKHR createInfo; - uint32_t *pQueueFamilyIndices; + safe_VkSwapchainCreateInfoKHR createInfo; std::vector images; - SWAPCHAIN_NODE(const VkSwapchainCreateInfoKHR *pCreateInfo) : createInfo(*pCreateInfo), pQueueFamilyIndices(NULL) { - if (pCreateInfo->queueFamilyIndexCount && pCreateInfo->imageSharingMode == VK_SHARING_MODE_CONCURRENT) { - pQueueFamilyIndices = new uint32_t[pCreateInfo->queueFamilyIndexCount]; - memcpy(pQueueFamilyIndices, pCreateInfo->pQueueFamilyIndices, pCreateInfo->queueFamilyIndexCount * sizeof(uint32_t)); - createInfo.pQueueFamilyIndices = pQueueFamilyIndices; - } - } - ~SWAPCHAIN_NODE() { delete[] pQueueFamilyIndices; } + SWAPCHAIN_NODE(const VkSwapchainCreateInfoKHR *pCreateInfo) + : createInfo(pCreateInfo) {} }; enum DRAW_TYPE { -- cgit v1.2.3