Skip to content

Commit

Permalink
igl | vulkan | Fix bug in staging device
Browse files Browse the repository at this point in the history
Reviewed By: corporateshark, rameshviswanathan

Differential Revision: D66967542

fbshipit-source-id: dd801255a39772d2165f9f264cf5dcfdf5d16da4
  • Loading branch information
mmaurer authored and facebook-github-bot committed Dec 10, 2024
1 parent c1f4fd5 commit 434bac5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/igl/vulkan/VulkanStagingDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ VulkanStagingDevice::MemoryRegion VulkanStagingDevice::nextFreeBlock(VkDeviceSiz
auto regionItr = regions_.begin();
while (regionItr != regions_.end()) {
// if requested size is available or if contiguous memory is not requested
if (regionItr->size >= requestedAlignedSize || (!contiguous)) {
if ((regionItr->size >= requestedAlignedSize || !contiguous) &&
(immediate_->isReady(regionItr->handle))) {
allocatedSize = std::min(regionItr->size, requestedAlignedSize);
break;
}
Expand Down

0 comments on commit 434bac5

Please sign in to comment.