/// <summary> /// /// </summary> /// <param name="pointer"> /// </param> internal unsafe void MarshalTo(SharpVk.Interop.Khronos.QueryPoolPerformanceCreateInfo *pointer) { pointer->SType = StructureType.QueryPoolPerformanceCreateInfo; pointer->Next = null; pointer->QueueFamilyIndex = this.QueueFamilyIndex; pointer->CounterIndexCount = (uint)(Interop.HeapUtil.GetLength(this.CounterIndices)); if (this.CounterIndices != null) { var fieldPointer = (uint *)(Interop.HeapUtil.AllocateAndClear <uint>(this.CounterIndices.Length).ToPointer()); for (int index = 0; index < (uint)(this.CounterIndices.Length); index++) { fieldPointer[index] = this.CounterIndices[index]; } pointer->CounterIndices = fieldPointer; } else { pointer->CounterIndices = null; } }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The PhysicalDevice handle to extend. /// </param> /// <param name="performanceQueryCreateInfo"> /// </param> public static unsafe uint GetQueueFamilyPerformanceQueryPasses(this SharpVk.PhysicalDevice extendedHandle, SharpVk.Khronos.QueryPoolPerformanceCreateInfo performanceQueryCreateInfo) { try { uint result = default(uint); CommandCache commandCache = default(CommandCache); SharpVk.Interop.Khronos.QueryPoolPerformanceCreateInfo *marshalledPerformanceQueryCreateInfo = default(SharpVk.Interop.Khronos.QueryPoolPerformanceCreateInfo *); uint marshalledNumPasses = default(uint); commandCache = extendedHandle.commandCache; marshalledPerformanceQueryCreateInfo = (SharpVk.Interop.Khronos.QueryPoolPerformanceCreateInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Khronos.QueryPoolPerformanceCreateInfo>()); performanceQueryCreateInfo.MarshalTo(marshalledPerformanceQueryCreateInfo); SharpVk.Interop.Khronos.VkPhysicalDeviceGetQueueFamilyPerformanceQueryPassesDelegate commandDelegate = commandCache.Cache.vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR; commandDelegate(extendedHandle.handle, marshalledPerformanceQueryCreateInfo, &marshalledNumPasses); result = marshalledNumPasses; return(result); } finally { Interop.HeapUtil.FreeAll(); } }