mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-26 08:51:31 +11:00
Handle WHOLE_SIZE for memory mapping
This commit is contained in:
parent
1d299a4949
commit
3d5fd5ccad
|
@ -793,13 +793,15 @@ pub extern "C" fn gfxMapMemory(
|
|||
_flags: VkMemoryMapFlags,
|
||||
ppData: *mut *mut ::std::os::raw::c_void,
|
||||
) -> VkResult {
|
||||
if size == VK_WHOLE_SIZE as VkDeviceSize {
|
||||
unimplemented!()
|
||||
}
|
||||
let range = if size == VK_WHOLE_SIZE as VkDeviceSize {
|
||||
(Some(offset), None)
|
||||
} else {
|
||||
(Some(offset), Some(offset + size))
|
||||
};
|
||||
|
||||
unsafe {
|
||||
*ppData = gpu.device
|
||||
.map_memory(&memory, offset..offset + size)
|
||||
.map_memory(&memory, range)
|
||||
.unwrap() as *mut _; // TODO
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue