diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-05-06 10:22:16 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-05-06 11:10:43 -0600 |
| commit | bdd5bb68629c5ed07237f32ae4339b3cd828122f (patch) | |
| tree | 562877cc545ef151546917f7d8da9bd89948f2d6 /layers/core_validation.cpp | |
| parent | 47680eb617fe5b9d71148b9e4c1169c822d00648 (diff) | |
| download | usermoji-bdd5bb68629c5ed07237f32ae4339b3cd828122f.tar.xz | |
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
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<std::mutex> 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; |
