vulkan: fix incoherent_range size calculation
This commit is contained in:
parent
3659006417
commit
122e28139a
1 changed files with 4 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue