1
0
Fork 0
forked from wry/wry

vulkan: fix incoherent_range size calculation

This commit is contained in:
Julian Orth 2026-03-23 18:52:37 +01:00
parent 3659006417
commit 122e28139a

View file

@ -100,10 +100,12 @@ impl VulkanAllocation {
}
fn incoherent_range(&self, mask: u64) -> MappedMemoryRange<'static> {
let lo = self.offset & !mask;
let hi = (self.offset + self.size + mask) & !mask;
MappedMemoryRange::default()
.memory(self.memory)
.offset(self.offset & !mask)
.size((self.size + mask) & !mask)
.offset(lo)
.size(hi - lo)
}
fn device(&self) -> &VulkanDevice {