Clean up descriptor pool setup

Fixes #1030
This commit is contained in:
Sascha Willems 2023-06-08 18:34:17 +02:00
parent 09c5dfd57f
commit 48fb28508b

View file

@ -3,7 +3,7 @@
*
* Relevant code parts are marked with [POI]
*
* Copyright (C) 2018 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2018-2023 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
@ -191,11 +191,11 @@ public:
std::array<VkDescriptorPoolSize, 2> descriptorPoolSizes{};
// Uniform buffers : 1 for scene and 1 per object (scene and local matrices)
// Uniform buffers : 1 per object
descriptorPoolSizes[0].type = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
descriptorPoolSizes[0].descriptorCount = 1 + static_cast<uint32_t>(cubes.size());
descriptorPoolSizes[0].descriptorCount = static_cast<uint32_t>(cubes.size());
// Combined image samples : 1 per mesh texture
// Combined image samples : 1 per object texture
descriptorPoolSizes[1].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
descriptorPoolSizes[1].descriptorCount = static_cast<uint32_t>(cubes.size());