public static VkSubmitInfo.Raw MarshalDirect(this VkSubmitInfo s, ref byte *unmanaged) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } var pNext = s.Next.MarshalIndirect(ref unmanaged); var pWaitSemaphores = s.WaitSemaphores.MarshalDirect(ref unmanaged); var pWaitDstStageMask = s.WaitDstStageMask.MarshalDirect(ref unmanaged); var pCommandBuffers = s.CommandBuffers.MarshalDirect(ref unmanaged); var pSignalSemaphores = s.SignalSemaphores.MarshalDirect(ref unmanaged); VkSubmitInfo.Raw result; result.sType = VkStructureType.SubmitInfo; result.pNext = pNext; result.waitSemaphoreCount = s.WaitSemaphores?.Count ?? 0; result.pWaitSemaphores = pWaitSemaphores; result.pWaitDstStageMask = pWaitDstStageMask; result.commandBufferCount = s.CommandBuffers?.Count ?? 0; result.pCommandBuffers = pCommandBuffers; result.signalSemaphoreCount = s.SignalSemaphores?.Count ?? 0; result.pSignalSemaphores = pSignalSemaphores; return(result); }
public static VkSubmitInfo.Raw *MarshalIndirect(this VkSubmitInfo s, ref byte *unmanaged) { if (s == null) { return((VkSubmitInfo.Raw *) 0); } var result = (VkSubmitInfo.Raw *)unmanaged; unmanaged += VkSubmitInfo.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public static int SizeOfMarshalDirect(this VkSubmitInfo s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect() + s.WaitSemaphores.SizeOfMarshalDirect() + s.WaitDstStageMask.SizeOfMarshalDirect() + s.CommandBuffers.SizeOfMarshalDirect() + s.SignalSemaphores.SizeOfMarshalDirect()); }
public static int SizeOfMarshalIndirect(this VkSubmitInfo s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkSubmitInfo.Raw.SizeInBytes;