internal unsafe void MarshalTo(SharpVk.Interop.Khronos.FenceGetFileDescriptorInfo *pointer) { pointer->SType = StructureType.FenceGetFileDescriptorInfoKhr; pointer->Next = null; pointer->Fence = this.Fence?.handle ?? default(SharpVk.Interop.Fence); pointer->HandleType = this.HandleType; }
/// <summary> /// /// </summary> public static unsafe int GetFenceFileDescriptor(this SharpVk.Device extendedHandle, SharpVk.Khronos.FenceGetFileDescriptorInfo getFileDescriptorInfo) { try { int result = default(int); CommandCache commandCache = default(CommandCache); SharpVk.Interop.Khronos.FenceGetFileDescriptorInfo *marshalledGetFileDescriptorInfo = default(SharpVk.Interop.Khronos.FenceGetFileDescriptorInfo *); int marshalledFileDescriptor = default(int); commandCache = extendedHandle.commandCache; marshalledGetFileDescriptorInfo = (SharpVk.Interop.Khronos.FenceGetFileDescriptorInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.FenceGetFileDescriptorInfo>()); getFileDescriptorInfo.MarshalTo(marshalledGetFileDescriptorInfo); SharpVk.Interop.Khronos.VkDeviceGetFenceFileDescriptorDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.Khronos.VkDeviceGetFenceFileDescriptorDelegate>("vkGetFenceFdKHR", "instance"); Result methodResult = commandDelegate(extendedHandle.handle, marshalledGetFileDescriptorInfo, &marshalledFileDescriptor); if (SharpVkException.IsError(methodResult)) { throw SharpVkException.Create(methodResult); } result = marshalledFileDescriptor; return(result); } finally { Interop.HeapUtil.FreeAll(); } }