From 2d1c0acff2075d32f914782d71e90817a9941f96 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 17 Oct 2023 18:28:45 +0200 Subject: [PATCH] Fix out of descriptor pool error --- src/lightmapper/vk_lightmap.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lightmapper/vk_lightmap.cpp b/src/lightmapper/vk_lightmap.cpp index 714e15c..4e29980 100644 --- a/src/lightmapper/vk_lightmap.cpp +++ b/src/lightmapper/vk_lightmap.cpp @@ -118,7 +118,7 @@ void VkLightmap::SelectSurfaces(const TArray& surfaces) selectedSurfaces.Clear(); const int spacing = 5; // Note: the spacing is here to avoid that the resolve sampler finds data from other surface tiles - RectPacker packer(bakeImageSize - 2, bakeImageSize - 2, RectPacker::Spacing(spacing)); + RectPacker packer(bakeImageSize - spacing, bakeImageSize - spacing, RectPacker::Spacing(spacing)); for (int i = 0, count = surfaces.Size(); i < count; i++) { @@ -991,8 +991,9 @@ void VkLightmap::CreateCopyPipeline() .Create(fb->GetDevice()); copy.descriptorPool = DescriptorPoolBuilder() - .AddPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 256) - .MaxSets(256) + .AddPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1) + .AddPoolSize(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1) + .MaxSets(1) .DebugName("copy.descriptorPool") .Create(fb->GetDevice());