public static int SizeOfMarshalDirect(this VkMappedMemoryRange s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect()); }
public static VkMappedMemoryRange.Raw *MarshalIndirect(this VkMappedMemoryRange s, ref byte *unmanaged) { if (s == null) { return((VkMappedMemoryRange.Raw *) 0); } var result = (VkMappedMemoryRange.Raw *)unmanaged; unmanaged += VkMappedMemoryRange.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public static VkMappedMemoryRange.Raw MarshalDirect(this VkMappedMemoryRange s, ref byte *unmanaged) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } var pNext = s.Next.MarshalIndirect(ref unmanaged); VkMappedMemoryRange.Raw result; result.sType = VkStructureType.MappedMemoryRange; result.pNext = pNext; result.memory = s.Memory?.Handle ?? VkDeviceMemory.HandleType.Null; result.offset = s.Offset; result.size = s.Size; return(result); }
public static int SizeOfMarshalIndirect(this VkMappedMemoryRange s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkMappedMemoryRange.Raw.SizeInBytes;