aboutsummaryrefslogtreecommitdiff
path: root/layers
diff options
context:
space:
mode:
authorKarl Schultz <karl@lunarg.com>2016-03-25 13:21:25 -0600
committerKarl Schultz <karl@lunarg.com>2016-03-25 13:21:25 -0600
commit45e8713f5cebc2634f6f1aa6ec555eec054c5fea (patch)
tree8b59efbe3a74b6c715cfffd435251867393714d2 /layers
parent7ac52e831af1959dbc871e9960d6d1dc05e0402e (diff)
downloadusermoji-45e8713f5cebc2634f6f1aa6ec555eec054c5fea.tar.xz
layers: Use vector::resize instead of reserve to avoid portability issue.
Fixes layer crash on Windows with cube --validate. On Windows, std::vector won't bump up the size of a vector (up to the reserved amount) on an out_of_range access, while linux will.
Diffstat (limited to 'layers')
-rw-r--r--layers/core_validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index a11a214b..eb6acd14 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6789,7 +6789,7 @@ vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAl
pNewNode->set = pDescriptorSets[i];
pNewNode->descriptorCount = (pLayout->createInfo.bindingCount != 0) ? pLayout->endIndex + 1 : 0;
if (pNewNode->descriptorCount) {
- pNewNode->pDescriptorUpdates.reserve(pNewNode->descriptorCount);
+ pNewNode->pDescriptorUpdates.resize(pNewNode->descriptorCount);
}
dev_data->setMap[pDescriptorSets[i]] = pNewNode;
}