From: Chris Forbes Date: Mon, 3 Oct 2016 01:12:59 +0000 (+1300) Subject: layers: Use safe_VkSwapchainCreateInfoKHR in CV X-Git-Tag: accepted/tizen/3.0.m2/mobile/20170105.023708~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6403a181ee66acc5131ab6ee01cdbce16e5f8ae;p=platform%2Fupstream%2FVulkan-LoaderAndValidationLayers.git layers: Use safe_VkSwapchainCreateInfoKHR in CV Signed-off-by: Chris Forbes --- 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 {