We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87a9c44 commit 908da9dCopy full SHA for 908da9d
src/nbl/video/CVulkanLogicalDevice.h
@@ -1246,6 +1246,17 @@ class CVulkanLogicalDevice final : public ILogicalDevice
1246
std::vector<VkSampler> vk_samplers;
1247
std::vector<VkDescriptorSetLayoutBinding> vk_dsLayoutBindings;
1248
1249
+ uint32_t maxSamplersCount = 0u;
1250
+ for (uint32_t b = 0u; b < bindingCount; ++b)
1251
+ {
1252
+ auto binding = _begin + b;
1253
+ if (binding->samplers && binding->count > 0u)
1254
+ maxSamplersCount += binding->count;
1255
+ }
1256
+
1257
+ vk_samplers.reserve(maxSamplersCount); // Reserve to avoid resizing and pointer change while iterating
1258
+ vk_dsLayoutBindings.reserve(bindingCount);
1259
1260
for (uint32_t b = 0u; b < bindingCount; ++b)
1261
{
1262
auto binding = _begin + b;
0 commit comments