aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-10-03 14:12:59 +1300
committerChris Forbes <chrisforbes@google.com>2016-10-04 08:37:26 +1300
commit2e8f29b8ff580384a4b461b19d75a4cca6115845 (patch)
tree516a9f8097f30e6f8875eb482c4c260774da01ec
parentefeb239c5b126a02689eb853934d04499cc15a70 (diff)
downloadusermoji-2e8f29b8ff580384a4b461b19d75a4cca6115845.tar.xz
layers: Use safe_VkSwapchainCreateInfoKHR in CV
Signed-off-by: Chris Forbes <chrisforbes@google.com>
-rw-r--r--layers/core_validation_types.h13
1 files 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<VkImage> 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 {