aboutsummaryrefslogtreecommitdiff
path: root/layers/draw_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layers/draw_state.cpp')
-rw-r--r--layers/draw_state.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp
index 503d4207..f5435e4f 100644
--- a/layers/draw_state.cpp
+++ b/layers/draw_state.cpp
@@ -1341,11 +1341,13 @@ static bool has_descriptor_binding(layer_data *my_data, vector<VkDescriptorSetLa
auto const layout_node = my_data->descriptorSetLayoutMap[(*pipelineLayout)[slot.first]];
auto bindingIt = layout_node->bindingToIndexMap.find(slot.second);
- if (bindingIt == layout_node->bindingToIndexMap.end())
+ if ((bindingIt == layout_node->bindingToIndexMap.end()) || (layout_node->createInfo.pBindings == NULL))
return false;
- type = layout_node->descriptorTypes[bindingIt->second];
- stage_flags = layout_node->stageFlags[bindingIt->second];
+ assert(bindingIt->second < layout_node->createInfo.bindingCount);
+ VkDescriptorSetLayoutBinding binding = layout_node->createInfo.pBindings[bindingIt->second];
+ type = binding.descriptorType;
+ stage_flags = binding.stageFlags;
return true;
}