Skip to content

Commit 00a995b

Browse files
committed
fix: vulkan destroy texture cleanup forgetting image views
1 parent 5e7ec1b commit 00a995b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

extensions/pl_graphics_vulkan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4245,6 +4245,8 @@ pl_destroy_texture(plDevice* ptDevice, plTextureHandle tHandle)
42454245
{
42464246
pl_log_trace_f(gptLog, uLogChannelGraphics, "destroy texture %u immediately", tHandle.uIndex);
42474247
plVulkanTexture* ptVulkanResource = &ptDevice->sbtTexturesHot[tHandle.uIndex];
4248+
vkDestroyImageView(ptDevice->tLogicalDevice, ptDevice->sbtTexturesHot[tHandle.uIndex].tImageView, gptGraphics->ptAllocationCallbacks);
4249+
ptDevice->sbtTexturesHot[tHandle.uIndex].tImageView = VK_NULL_HANDLE;
42484250
vkDestroyImage(ptDevice->tLogicalDevice, ptVulkanResource->tImage, gptGraphics->ptAllocationCallbacks);
42494251
ptVulkanResource->tImage = VK_NULL_HANDLE;
42504252
pl_sb_push(ptDevice->sbtTextureFreeIndices, tHandle.uIndex);

0 commit comments

Comments
 (0)