diff options
| author | Tobin Ehlis <tobine@google.com> | 2017-06-20 08:30:39 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-06-20 16:53:12 -0600 |
| commit | c5366f2743146b95dc23c26d7acba9e7fbe393b3 (patch) | |
| tree | dc5c182be454de5c418e548f9fd0c3378c948071 /layers/core_validation.cpp | |
| parent | 5e47f04e53b6ef65e6f3d064218ae2d1232ca318 (diff) | |
| download | usermoji-c5366f2743146b95dc23c26d7acba9e7fbe393b3.tar.xz | |
layers:Migrate DSLayout to shared_ptr
Update Descriptor Set Layout copy in Descriptor Set, as well as various
ptr references to use shared_ptr.
This fixes some potential memory leaks and makes Descriptor Set class
lighter weight.
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index ebc9d8d9..72b8bcd5 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -709,12 +709,13 @@ FRAMEBUFFER_STATE *GetFramebufferState(const layer_data *dev_data, VkFramebuffer return it->second.get(); } -cvdescriptorset::DescriptorSetLayout const *GetDescriptorSetLayout(layer_data const *dev_data, VkDescriptorSetLayout dsLayout) { +std::shared_ptr<cvdescriptorset::DescriptorSetLayout> const GetDescriptorSetLayout(layer_data const *dev_data, + VkDescriptorSetLayout dsLayout) { auto it = dev_data->descriptorSetLayoutMap.find(dsLayout); if (it == dev_data->descriptorSetLayoutMap.end()) { return nullptr; } - return it->second.get(); + return it->second; } static PIPELINE_LAYOUT_NODE const *getPipelineLayout(layer_data const *dev_data, VkPipelineLayout pipeLayout) { |
