Skip to content

Commit

Permalink
Fix deleted texture/sampler not being freed up
Browse files Browse the repository at this point in the history
Summary:
When `enableDescriptorIndexing` is set to false, we were not removing the deleted textures/samplers and their indices.

Move the check to after the indices are freed up, since we want to skip descriptor set updates later.

Reviewed By: corporateshark

Differential Revision: D48543247

fbshipit-source-id: e59c68b18c390e2decf18522234217e09faf34f9
  • Loading branch information
Shayan Javed authored and facebook-github-bot committed Aug 22, 2023
1 parent 77de2d1 commit f2d4f0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/igl/vulkan/VulkanContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,6 @@ std::shared_ptr<VulkanImage> VulkanContext::createImageFromFileDescriptor(
}

void VulkanContext::checkAndUpdateDescriptorSets() const {
if (!config_.enableDescriptorIndexing) {
return;
}
if (awaitingDeletion_) {
// Our descriptor set was created with VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT which
// indicates that descriptors in this binding that are not dynamically used need not contain
Expand Down Expand Up @@ -1035,6 +1032,9 @@ void VulkanContext::checkAndUpdateDescriptorSets() const {
}

// update Vulkan descriptor set here
if (!config_.enableDescriptorIndexing) {
return;
}

// 1. Sampled and storage images
std::vector<VkDescriptorImageInfo> infoSampledImages;
Expand Down

0 comments on commit f2d4f0c

Please sign in to comment.