public static VkBindSparseInfo.Raw MarshalDirect(this VkBindSparseInfo 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 pBufferBinds = s.BufferBinds.MarshalDirect(ref unmanaged); var pImageOpaqueBinds = s.ImageOpaqueBinds.MarshalDirect(ref unmanaged); var pImageBinds = s.ImageBinds.MarshalDirect(ref unmanaged); var pSignalSemaphores = s.SignalSemaphores.MarshalDirect(ref unmanaged); VkBindSparseInfo.Raw result; result.sType = VkStructureType.BindSparseInfo; result.pNext = pNext; result.waitSemaphoreCount = s.WaitSemaphores?.Count ?? 0; result.pWaitSemaphores = pWaitSemaphores; result.bufferBindCount = s.BufferBinds?.Count ?? 0; result.pBufferBinds = pBufferBinds; result.imageOpaqueBindCount = s.ImageOpaqueBinds?.Count ?? 0; result.pImageOpaqueBinds = pImageOpaqueBinds; result.imageBindCount = s.ImageBinds?.Count ?? 0; result.pImageBinds = pImageBinds; result.signalSemaphoreCount = s.SignalSemaphores?.Count ?? 0; result.pSignalSemaphores = pSignalSemaphores; return(result); }
public static VkBindSparseInfo.Raw *MarshalIndirect(this VkBindSparseInfo s, ref byte *unmanaged) { if (s == null) { return((VkBindSparseInfo.Raw *) 0); } var result = (VkBindSparseInfo.Raw *)unmanaged; unmanaged += VkBindSparseInfo.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public static int SizeOfMarshalDirect(this VkBindSparseInfo s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect() + s.WaitSemaphores.SizeOfMarshalDirect() + s.BufferBinds.SizeOfMarshalDirect() + s.ImageOpaqueBinds.SizeOfMarshalDirect() + s.ImageBinds.SizeOfMarshalDirect() + s.SignalSemaphores.SizeOfMarshalDirect()); }
public static int SizeOfMarshalIndirect(this VkBindSparseInfo s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkBindSparseInfo.Raw.SizeInBytes;