aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2017-06-21 10:16:10 -0600
committerTobin Ehlis <tobine@google.com>2017-06-21 10:51:36 -0600
commit6d8923d41ff611456d52b25543a9a19f66bb89bf (patch)
tree2b1aca157f4957fd37bd1d6fa9e2bd46889451bc
parenta2e99be395d6d5158bad8b902c01bfcfaa9ad10d (diff)
downloadusermoji-6d8923d41ff611456d52b25543a9a19f66bb89bf.tar.xz
layers:Make DSLayout const in shared_ptrs
Declare DescriptorSetLayout's const for shared_ptrs in Pipeline layout and DSAllocate structs.
-rw-r--r--layers/core_validation.cpp6
-rw-r--r--layers/core_validation_types.h4
-rw-r--r--layers/descriptor_sets.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index cf4b738a..62bdb774 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::shared_ptr<cvdescriptorset::DescriptorSetLayout>> descriptorSetLayoutMap;
+ unordered_map<VkDescriptorSetLayout, std::shared_ptr<cvdescriptorset::DescriptorSetLayout const>> descriptorSetLayoutMap;
unordered_map<VkPipelineLayout, PIPELINE_LAYOUT_NODE> pipelineLayoutMap;
unordered_map<VkDeviceMemory, unique_ptr<DEVICE_MEM_INFO>> memObjMap;
unordered_map<VkFence, FENCE_NODE> fenceMap;
@@ -709,8 +709,8 @@ FRAMEBUFFER_STATE *GetFramebufferState(const layer_data *dev_data, VkFramebuffer
return it->second.get();
}
-std::shared_ptr<cvdescriptorset::DescriptorSetLayout> const GetDescriptorSetLayout(layer_data const *dev_data,
- VkDescriptorSetLayout dsLayout) {
+std::shared_ptr<cvdescriptorset::DescriptorSetLayout const> const GetDescriptorSetLayout(layer_data const *dev_data,
+ VkDescriptorSetLayout dsLayout) {
auto it = dev_data->descriptorSetLayoutMap.find(dsLayout);
if (it == dev_data->descriptorSetLayoutMap.end()) {
return nullptr;
diff --git a/layers/core_validation_types.h b/layers/core_validation_types.h
index 785c1593..1d2761a7 100644
--- a/layers/core_validation_types.h
+++ b/layers/core_validation_types.h
@@ -526,7 +526,7 @@ struct hash<ImageSubresourcePair> {
// Store layouts and pushconstants for PipelineLayout
struct PIPELINE_LAYOUT_NODE {
VkPipelineLayout layout;
- std::vector<std::shared_ptr<cvdescriptorset::DescriptorSetLayout>> set_layouts;
+ std::vector<std::shared_ptr<cvdescriptorset::DescriptorSetLayout const>> set_layouts;
std::vector<VkPushConstantRange> push_constant_ranges;
PIPELINE_LAYOUT_NODE() : layout(VK_NULL_HANDLE), set_layouts{}, push_constant_ranges{} {}
@@ -765,7 +765,7 @@ struct DeviceExtensions;
namespace core_validation {
struct layer_data;
cvdescriptorset::DescriptorSet *GetSetNode(const layer_data *, VkDescriptorSet);
-std::shared_ptr<cvdescriptorset::DescriptorSetLayout> const GetDescriptorSetLayout(layer_data const *, VkDescriptorSetLayout);
+std::shared_ptr<cvdescriptorset::DescriptorSetLayout const> const GetDescriptorSetLayout(layer_data const *, VkDescriptorSetLayout);
DESCRIPTOR_POOL_STATE *GetDescriptorPoolState(const layer_data *, const VkDescriptorPool);
BUFFER_STATE *GetBufferState(const layer_data *, VkBuffer);
IMAGE_STATE *GetImageState(const layer_data *, VkImage);
diff --git a/layers/descriptor_sets.h b/layers/descriptor_sets.h
index 239a477c..56719d58 100644
--- a/layers/descriptor_sets.h
+++ b/layers/descriptor_sets.h
@@ -276,7 +276,7 @@ class BufferDescriptor : public Descriptor {
// Structs to contain common elements that need to be shared between Validate* and Perform* calls below
struct AllocateDescriptorSetsData {
uint32_t required_descriptors_by_type[VK_DESCRIPTOR_TYPE_RANGE_SIZE];
- std::vector<std::shared_ptr<DescriptorSetLayout>> layout_nodes;
+ std::vector<std::shared_ptr<DescriptorSetLayout const>> layout_nodes;
AllocateDescriptorSetsData(uint32_t);
};
// Helper functions for descriptor set functions that cross multiple sets