diff --git a/src/engine/vk/VkDescriptorPool.cpp b/src/engine/vk/VkDescriptorPool.cpp index 589c618..08e1a49 100644 --- a/src/engine/vk/VkDescriptorPool.cpp +++ b/src/engine/vk/VkDescriptorPool.cpp @@ -10,7 +10,7 @@ namespace Vixen::Vk { const VkDescriptorPoolCreateInfo info{ .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, .pNext = nullptr, - .flags = 0, + .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, .maxSets = maxSets, .poolSizeCount = static_cast(sizes.size()), .pPoolSizes = sizes.data() diff --git a/src/engine/vk/VkDescriptorSet.cpp b/src/engine/vk/VkDescriptorSet.cpp index 1086e07..0b3d7b3 100644 --- a/src/engine/vk/VkDescriptorSet.cpp +++ b/src/engine/vk/VkDescriptorSet.cpp @@ -37,7 +37,10 @@ namespace Vixen::Vk { } VkDescriptorSet::~VkDescriptorSet() { - vkFreeDescriptorSets(device->getDevice(), pool->getPool(), 1, &set); + checkVulkanResult( + vkFreeDescriptorSets(device->getDevice(), pool->getPool(), 1, &set), + "Failed to free descriptor set" + ); } void VkDescriptorSet::updateUniformBuffer(const uint32_t binding, const VkBuffer& buffer) const {