Skip to content

Commit

Permalink
RenderImageCollection: Destroy stale image views
Browse files Browse the repository at this point in the history
  • Loading branch information
sndels committed Aug 16, 2024
1 parent 0664fb7 commit ca4fa1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/RenderImageCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Span<const vk::ImageView> RenderImageCollection::subresourceViews(
// aren't used for multiple frames
if (views.empty() || image.handle != m_cachedImages[handle.index])
{
if (!views.empty())
gDevice.destroy(views);

views.resize(image.subresourceRange.levelCount);
// TODO:
// Isolate the last concatenated name if this gets shared resources at
Expand Down

0 comments on commit ca4fa1f

Please sign in to comment.