graphics: keep bounded image heaps resident in a bindless descriptor set

This commit is contained in:
nmzik committed 2026-10-23 07:17:57 +02:00
1 parent 79837b423d
commit 27dc7c281f
31 files changed
+1377 -75

No files matched your search

@@ -212,6 +212,13 @@ Image::Barriers Image::GetBarriers(vk::ImageLayout destinat
barriers.push_back(barrier);
}
// Resident heaps sample their images in the read state; only leaving it invalidates them.
if (std::ranges::any_of(barriers, [&](const vk::ImageMemoryBarrier2& barrier) {
return barrier.oldLayout == ReadLayout() &&
barrier.srcAccessMask == vk::AccessFlagBits2::eShaderRead;
})) {
HeapChanged();
}
state = {destination_stage, destination_access, destination_layout};
return barriers;
}