Skip to content

Commit 7d8121b

Browse files
committed
Fix pool sizes
1 parent 100b2aa commit 7d8121b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/descriptorsets/descriptorsets.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class VulkanExample : public VulkanExampleBase
101101

102102
// Combined image samples : 1 per object texture
103103
descriptorPoolSizes[1].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
104-
// Images are static, and never update after initial upload, so no need to duplicate these per frame in flight
105-
descriptorPoolSizes[1].descriptorCount = static_cast<uint32_t>(cubes.size());
104+
// Images are static, and never update after initial upload, but as they use the same descriptor set as buffers, we need to duplicate the descriptor count here too
105+
descriptorPoolSizes[1].descriptorCount = static_cast<uint32_t>(cubes.size()) * maxConcurrentFrames;
106106

107107
// Create the global descriptor pool
108108
VkDescriptorPoolCreateInfo descriptorPoolCI = {};

0 commit comments

Comments
 (0)