diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.cpp b/WickedEngine/wiGraphicsDevice_Vulkan.cpp index 1997262b0..2b84133e1 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.cpp +++ b/WickedEngine/wiGraphicsDevice_Vulkan.cpp @@ -703,7 +703,7 @@ namespace vulkan_internal } else { - allocationhandler->destroyer_bindlessStorageTexelBuffers.push_back(std::make_pair(x.index, framecount)); + allocationhandler->destroyer_bindlessStorageBuffers.push_back(std::make_pair(x.index, framecount)); } } subresources_srv.clear(); diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.h b/WickedEngine/wiGraphicsDevice_Vulkan.h index ebaca4410..4ca6e9a6a 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.h +++ b/WickedEngine/wiGraphicsDevice_Vulkan.h @@ -926,6 +926,8 @@ namespace wi::graphics // Deferred destroy of resources that the GPU is already finished with: void Update(uint64_t FRAMECOUNT, uint32_t BUFFERCOUNT) { + std::scoped_lock lck(destroylocker); + const auto destroy = [&](auto&& queue, auto&& handler) { while (!queue.empty()) { if (queue.front().second + BUFFERCOUNT < FRAMECOUNT) @@ -943,8 +945,6 @@ namespace wi::graphics framecount = FRAMECOUNT; - std::scoped_lock lck(destroylocker); - destroy(destroyer_allocations, [&](auto& item) { vmaFreeMemory(allocator, item); }); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index fea9dd43b..6d459b109 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 72; // minor bug fixes, alterations, refactors, updates - const int revision = 32; + const int revision = 33; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);