aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-06-19 16:38:57 -0600
committerTobin Ehlis <tobine@google.com>2017-06-20 16:53:12 -0600
commit5e47f04e53b6ef65e6f3d064218ae2d1232ca318 (patch)
tree2b80e62f8172744cc81705d8487b7ce4fc172b42 /layers/core_validation.cpp
parent725021525a7f228e45633190d5aebd4f938afefd (diff)
downloadusermoji-5e47f04e53b6ef65e6f3d064218ae2d1232ca318.tar.xz
layers:Used shared_ptr for DSLayout
Modify DescriptorSetLayout map to use shared_ptr. Will follow-on with changes to Descriptor Set class that share the ptrs.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 112398f6..ebc9d8d9 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -149,7 +149,7 @@ struct layer_data {
unordered_map<VkCommandPool, COMMAND_POOL_NODE> commandPoolMap;
unordered_map<VkDescriptorPool, DESCRIPTOR_POOL_STATE *> descriptorPoolMap;
unordered_map<VkDescriptorSet, cvdescriptorset::DescriptorSet *> setMap;
- unordered_map<VkDescriptorSetLayout, std::unique_ptr<cvdescriptorset::DescriptorSetLayout>> descriptorSetLayoutMap;
+ unordered_map<VkDescriptorSetLayout, std::shared_ptr<cvdescriptorset::DescriptorSetLayout>> descriptorSetLayoutMap;
unordered_map<VkPipelineLayout, PIPELINE_LAYOUT_NODE> pipelineLayoutMap;
unordered_map<VkDeviceMemory, unique_ptr<DEVICE_MEM_INFO>> memObjMap;
unordered_map<VkFence, FENCE_NODE> fenceMap;
@@ -4529,8 +4529,8 @@ static bool PreCallValidateCreateDescriptorSetLayout(layer_data *dev_data, const
static void PostCallRecordCreateDescriptorSetLayout(layer_data *dev_data, const VkDescriptorSetLayoutCreateInfo *create_info,
VkDescriptorSetLayout set_layout) {
- dev_data->descriptorSetLayoutMap[set_layout] = std::unique_ptr<cvdescriptorset::DescriptorSetLayout>(
- new cvdescriptorset::DescriptorSetLayout(create_info, set_layout));
+ dev_data->descriptorSetLayoutMap[set_layout] =
+ std::shared_ptr<cvdescriptorset::DescriptorSetLayout>(new cvdescriptorset::DescriptorSetLayout(create_info, set_layout));
}
VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo,