aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2016-05-10 16:02:49 +1200
committerChris Forbes <chrisforbes@google.com>2016-05-11 12:48:12 +1200
commitc32fad2f3d147f37a21121356668bf55423d9a1b (patch)
tree43d2d6f6a982a915b317ac6a7ed85bb248957d65 /layers/core_validation.cpp
parent60090b9826873fba84c7b543c2933cabf0f05dc5 (diff)
downloadusermoji-c32fad2f3d147f37a21121356668bf55423d9a1b.tar.xz
layers: have PIPELINE_LAYOUT_NODE hold ptrs to descriptor set layouts
Just holding the nondispatchable object handles forces get_descriptor_binding to use layer_data, which we'd rather it didn't. Signed-off-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index bba96b7a..6356897e 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5812,14 +5812,25 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPip
}
// TODO : Add warning if ranges overlap
}
+
+ if (skipCall)
+ return VK_ERROR_VALIDATION_FAILED_EXT;
+
VkResult result = dev_data->device_dispatch_table->CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout);
if (VK_SUCCESS == result) {
std::lock_guard<std::mutex> lock(global_lock);
- // TODOSC : Merge capture of the setLayouts per pipeline
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];
+ auto set_layout_it = dev_data->descriptorSetLayoutMap.find(pCreateInfo->pSetLayouts[i]);
+ if (set_layout_it != dev_data->descriptorSetLayoutMap.end()) {
+ plNode.setLayouts[i] = set_layout_it->second;
+ }
+ else {
+ plNode.setLayouts[i] = nullptr;
+ }
}
plNode.pushConstantRanges.resize(pCreateInfo->pushConstantRangeCount);
for (i = 0; i < pCreateInfo->pushConstantRangeCount; ++i) {