diff --git a/examples/texturesparseresidency/texturesparseresidency.cpp b/examples/texturesparseresidency/texturesparseresidency.cpp index c652461ec4671709e323304bc9af8bd5c68f3a20..4832a54a6ea337992603f00e20bec16774735314 100644 --- a/examples/texturesparseresidency/texturesparseresidency.cpp +++ b/examples/texturesparseresidency/texturesparseresidency.cpp @@ -787,6 +787,7 @@ void VulkanExample::fillRandomPages() VK_CHECK_RESULT(vkCreateFence(device, &fenceInfo, nullptr, &fence)); vkQueueBindSparse(queue, 1, &texture.bindSparseInfo, fence); vkWaitForFences(device, 1, &fence, VK_TRUE, UINT64_MAX); + vkDestroyFence(device, fence, nullptr); for (auto &page: updatedPages) { uploadContent(page, texture.image);