From bdd5bb68629c5ed07237f32ae4339b3cd828122f Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Fri, 6 May 2016 10:22:16 -0600 Subject: layers: GH494 Add constructors for IMAGE and BUFFER nodes Add proper constructors for IMAGE_NODE and BUFFER_NODE classes and correctly initialize all of their data members. Change-Id: I6c9d4a3ba6f3ef8e569de55793de9d6f7fd406b1 --- layers/core_validation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ee4509a6..7a935022 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5504,8 +5504,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, c if (VK_SUCCESS == result) { std::lock_guard lock(global_lock); // TODO : This doesn't create deep copy of pQueueFamilyIndices so need to fix that if/when we want that data to be valid - dev_data->bufferMap[*pBuffer].createInfo = *pCreateInfo; - dev_data->bufferMap[*pBuffer].in_use.store(0); + dev_data->bufferMap.insert(std::make_pair(*pBuffer, BUFFER_NODE(pCreateInfo))); } return result; } @@ -5539,7 +5538,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, co IMAGE_LAYOUT_NODE image_node; image_node.layout = pCreateInfo->initialLayout; image_node.format = pCreateInfo->format; - dev_data->imageMap[*pImage].createInfo = *pCreateInfo; + dev_data->imageMap.insert(std::make_pair(*pImage, IMAGE_NODE(pCreateInfo))); ImageSubresourcePair subpair = {*pImage, false, VkImageSubresource()}; dev_data->imageSubresourceMap[*pImage].push_back(subpair); dev_data->imageLayoutMap[subpair] = image_node; -- cgit v1.2.3