diff --git a/NEW_RELEASE_NOTES.md b/NEW_RELEASE_NOTES.md index 4a1a9c7fa7e..71416f7f695 100644 --- a/NEW_RELEASE_NOTES.md +++ b/NEW_RELEASE_NOTES.md @@ -7,3 +7,4 @@ for next branch cut* header. appropriate header in [RELEASE_NOTES.md](./RELEASE_NOTES.md). ## Release notes for next branch cut +- vk: fix stage pool gc logic diff --git a/filament/backend/src/vulkan/VulkanStagePool.cpp b/filament/backend/src/vulkan/VulkanStagePool.cpp index 067b16afd84..8fb2abf79c2 100644 --- a/filament/backend/src/vulkan/VulkanStagePool.cpp +++ b/filament/backend/src/vulkan/VulkanStagePool.cpp @@ -37,6 +37,7 @@ VulkanStage const* VulkanStagePool::acquireStage(uint32_t numBytes) { if (iter != mFreeStages.end()) { auto stage = iter->second; mFreeStages.erase(iter); + stage->lastAccessed = mCurrentFrame; mUsedStages.insert(stage); return stage; } @@ -74,6 +75,7 @@ VulkanStageImage const* VulkanStagePool::acquireImage(PixelDataFormat format, Pi for (auto image : mFreeImages) { if (image->format == vkformat && image->width == width && image->height == height) { mFreeImages.erase(image); + image->lastAccessed = mCurrentFrame; mUsedImages.insert(image); return image; }