diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-07-07 09:20:13 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-07-07 13:43:00 -0600 |
| commit | c964fd0bc800e27554901f344c79b4322c0d21ba (patch) | |
| tree | 2e844696e5cce7e535104f150cd9dc4bac6015aa /layers/core_validation.cpp | |
| parent | c47591b3b0db616ef1c953bbe72cfdb93fc49257 (diff) | |
| download | usermoji-c964fd0bc800e27554901f344c79b4322c0d21ba.tar.xz | |
layers: Simplify PIPELINE_LAYOUT_NODE
Just use setLayout vector and kill duplicate descriptorSetLayout vector.
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 53bb7183..dda753c0 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2058,7 +2058,7 @@ static VkDescriptorSetLayoutBinding const * get_descriptor_binding(PIPELINE_LAYO if (!pipelineLayout) return nullptr; - if (slot.first >= pipelineLayout->descriptorSetLayouts.size()) + if (slot.first >= pipelineLayout->setLayouts.size()) return nullptr; return pipelineLayout->setLayouts[slot.first]->GetDescriptorSetLayoutBindingPtrFromBinding(slot.second); @@ -2301,11 +2301,11 @@ static bool verify_set_layout_compatibility(layer_data *my_data, const cvdescrip errorMsg = errorStr.str(); return false; } - if (layoutIndex >= pipeline_layout->descriptorSetLayouts.size()) { + auto num_sets = pipeline_layout->setLayouts.size(); + if (layoutIndex >= num_sets) { stringstream errorStr; - errorStr << "VkPipelineLayout (" << layout << ") only contains " << pipeline_layout->descriptorSetLayouts.size() - << " setLayouts corresponding to sets 0-" << pipeline_layout->descriptorSetLayouts.size() - 1 - << ", but you're attempting to bind set to index " << layoutIndex; + errorStr << "VkPipelineLayout (" << layout << ") only contains " << num_sets << " setLayouts corresponding to sets 0-" + << num_sets - 1 << ", but you're attempting to bind set to index " << layoutIndex; errorMsg = errorStr.str(); return false; } @@ -6063,10 +6063,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip if (VK_SUCCESS == result) { std::lock_guard<std::mutex> lock(global_lock); PIPELINE_LAYOUT_NODE &plNode = dev_data->pipelineLayoutMap[*pPipelineLayout]; - plNode.descriptorSetLayouts.resize(pCreateInfo->setLayoutCount); plNode.setLayouts.resize(pCreateInfo->setLayoutCount); for (i = 0; i < pCreateInfo->setLayoutCount; ++i) { - plNode.descriptorSetLayouts[i] = pCreateInfo->pSetLayouts[i]; plNode.setLayouts[i] = getDescriptorSetLayout(dev_data, pCreateInfo->pSetLayouts[i]); } plNode.pushConstantRanges.resize(pCreateInfo->pushConstantRangeCount); |
