/// <summary> /// Map a memory object into application address space. /// </summary> public void MapMemory(DeviceSize offset, DeviceSize size, MemoryMapFlags flags, ref IntPtr data) { unsafe { try { Result commandResult; void * marshalledData; commandResult = Interop.Commands.vkMapMemory(this.parent.handle, this.handle, offset, size, flags, &marshalledData); if (SharpVkException.IsError(commandResult)) { throw SharpVkException.Create(commandResult); } data = new IntPtr(marshalledData); } finally { Interop.HeapUtil.FreeLog(); } } }
public unsafe IntPtr MapMemory(DeviceMemory memory, ulong offset, ulong size, MemoryMapFlags flags) { IntPtr data; vkMapMemory(this, memory, offset, size, flags, &data).CheckError(); return data; }
internal static unsafe extern Result vkMapMemory(Device device, DeviceMemory memory, ulong offset, ulong size, MemoryMapFlags flags, IntPtr* data);