From c6403a181ee66acc5131ab6ee01cdbce16e5f8ae Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 3 Oct 2016 14:12:59 +1300 Subject: [PATCH] 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 05f05f2..8fef5c5 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 { -- 2.7.4