/// <summary> /// /// </summary> public static unsafe void ImportSemaphoreWin32Handle(this SharpVk.Device extendedHandle, SharpVk.Khronos.ImportSemaphoreWin32HandleInfo importSemaphoreWin32HandleInfo) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.Khronos.ImportSemaphoreWin32HandleInfo *marshalledImportSemaphoreWin32HandleInfo = default(SharpVk.Interop.Khronos.ImportSemaphoreWin32HandleInfo *); commandCache = extendedHandle.commandCache; marshalledImportSemaphoreWin32HandleInfo = (SharpVk.Interop.Khronos.ImportSemaphoreWin32HandleInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.ImportSemaphoreWin32HandleInfo>()); importSemaphoreWin32HandleInfo.MarshalTo(marshalledImportSemaphoreWin32HandleInfo); SharpVk.Interop.Khronos.VkDeviceImportSemaphoreWin32HandleDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkDeviceImportSemaphoreWin32HandleDelegate>("vkImportSemaphoreWin32HandleKHR", "instance"); Result methodResult = commandDelegate(extendedHandle.handle, marshalledImportSemaphoreWin32HandleInfo); if (SharpVkException.IsError(methodResult)) { throw SharpVkException.Create(methodResult); } } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> internal unsafe void MarshalTo(SharpVk.Interop.Khronos.ImportSemaphoreWin32HandleInfo *pointer) { pointer->SType = StructureType.ImportSemaphoreWin32HandleInfo; pointer->Next = null; pointer->Semaphore = this.Semaphore?.handle ?? default(SharpVk.Interop.Semaphore); if (this.Flags != null) { pointer->Flags = this.Flags.Value; } else { pointer->Flags = default(SharpVk.SemaphoreImportFlags); } if (this.HandleType != null) { pointer->HandleType = this.HandleType.Value; } else { pointer->HandleType = default(SharpVk.ExternalSemaphoreHandleTypeFlags); } if (this.Handle != null) { pointer->Handle = this.Handle.Value; } else { pointer->Handle = default(IntPtr); } if (this.Name != null) { pointer->Name = this.Name.Value; } else { pointer->Name = default(IntPtr); } }