/// <summary> /// /// </summary> public unsafe void WriteTimestamp(SharpVk.PipelineStageFlags pipelineStage, SharpVk.QueryPool queryPool, uint query) { try { Interop.Commands.vkCmdWriteTimestamp(this.handle, pipelineStage, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), query); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> public unsafe void ResetQueryPool(SharpVk.QueryPool queryPool, uint firstQuery, uint queryCount) { try { Interop.Commands.vkCmdResetQueryPool(this.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), firstQuery, queryCount); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> public unsafe void EndQuery(SharpVk.QueryPool queryPool, uint query) { try { Interop.Commands.vkCmdEndQuery(this.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), query); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The QueryPool handle to extend. /// </param> public static unsafe void Reset(this SharpVk.QueryPool extendedHandle, uint firstQuery, uint queryCount) { try { CommandCache commandCache = default(CommandCache); commandCache = extendedHandle.commandCache; SharpVk.Interop.Multivendor.VkQueryPoolResetDelegate commandDelegate = commandCache.Cache.vkResetQueryPoolEXT; commandDelegate(extendedHandle.parent.handle, extendedHandle.handle, firstQuery, queryCount); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> public unsafe void BeginQuery(SharpVk.QueryPool queryPool, uint query, SharpVk.QueryControlFlags?flags = default(SharpVk.QueryControlFlags?)) { try { SharpVk.QueryControlFlags marshalledFlags = default(SharpVk.QueryControlFlags); if (flags != null) { marshalledFlags = flags.Value; } else { marshalledFlags = default(SharpVk.QueryControlFlags); } Interop.Commands.vkCmdBeginQuery(this.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), query, marshalledFlags); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> public unsafe void CopyQueryPoolResults(SharpVk.QueryPool queryPool, uint firstQuery, uint queryCount, SharpVk.Buffer destinationBuffer, DeviceSize destinationOffset, DeviceSize stride, SharpVk.QueryResultFlags?flags = default(SharpVk.QueryResultFlags?)) { try { SharpVk.QueryResultFlags marshalledFlags = default(SharpVk.QueryResultFlags); if (flags != null) { marshalledFlags = flags.Value; } else { marshalledFlags = default(SharpVk.QueryResultFlags); } Interop.Commands.vkCmdCopyQueryPoolResults(this.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), firstQuery, queryCount, destinationBuffer?.handle ?? default(SharpVk.Interop.Buffer), destinationOffset, stride, marshalledFlags); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> /// <param name="accelerationStructures"> /// </param> /// <param name="queryType"> /// </param> /// <param name="queryPool"> /// </param> /// <param name="firstQuery"> /// </param> public static unsafe void WriteAccelerationStructuresProperties(this SharpVk.CommandBuffer extendedHandle, ArrayProxy <SharpVk.NVidia.AccelerationStructure>?accelerationStructures, SharpVk.QueryType queryType, SharpVk.QueryPool queryPool, uint firstQuery) { try { CommandCache commandCache = default(CommandCache); SharpVk.Interop.NVidia.AccelerationStructure *marshalledAccelerationStructures = default(SharpVk.Interop.NVidia.AccelerationStructure *); commandCache = extendedHandle.commandCache; if (accelerationStructures.IsNull()) { marshalledAccelerationStructures = null; } else { if (accelerationStructures.Value.Contents == ProxyContents.Single) { marshalledAccelerationStructures = (SharpVk.Interop.NVidia.AccelerationStructure *)(Interop.HeapUtil.Allocate <SharpVk.Interop.NVidia.AccelerationStructure>()); *(SharpVk.Interop.NVidia.AccelerationStructure *)(marshalledAccelerationStructures) = accelerationStructures.Value.GetSingleValue()?.handle ?? default(SharpVk.Interop.NVidia.AccelerationStructure); } else { var fieldPointer = (SharpVk.Interop.NVidia.AccelerationStructure *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.NVidia.AccelerationStructure>(Interop.HeapUtil.GetLength(accelerationStructures.Value)).ToPointer()); for (int index = 0; index < (uint)(Interop.HeapUtil.GetLength(accelerationStructures.Value)); index++) { fieldPointer[index] = accelerationStructures.Value[index]?.handle ?? default(SharpVk.Interop.NVidia.AccelerationStructure); } marshalledAccelerationStructures = fieldPointer; } } SharpVk.Interop.NVidia.VkCommandBufferWriteAccelerationStructuresPropertiesDelegate commandDelegate = commandCache.Cache.vkCmdWriteAccelerationStructuresPropertiesNV; commandDelegate(extendedHandle.handle, (uint)(Interop.HeapUtil.GetLength(accelerationStructures)), marshalledAccelerationStructures, queryType, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), firstQuery); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> public static unsafe void EndQueryIndexed(this SharpVk.CommandBuffer extendedHandle, SharpVk.QueryPool queryPool, uint query, uint index) { try { CommandCache commandCache = default(CommandCache); commandCache = extendedHandle.commandCache; SharpVk.Interop.Multivendor.VkCommandBufferEndQueryIndexedDelegate commandDelegate = commandCache.Cache.vkCmdEndQueryIndexedEXT; commandDelegate(extendedHandle.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), query, index); } finally { Interop.HeapUtil.FreeAll(); } }
/// <summary> /// /// </summary> /// <param name="extendedHandle"> /// The CommandBuffer handle to extend. /// </param> public static unsafe void BeginQueryIndexed(this SharpVk.CommandBuffer extendedHandle, SharpVk.QueryPool queryPool, uint query, uint index, SharpVk.QueryControlFlags?flags = default(SharpVk.QueryControlFlags?)) { try { CommandCache commandCache = default(CommandCache); SharpVk.QueryControlFlags marshalledFlags = default(SharpVk.QueryControlFlags); commandCache = extendedHandle.commandCache; if (flags != null) { marshalledFlags = flags.Value; } else { marshalledFlags = default(SharpVk.QueryControlFlags); } SharpVk.Interop.Multivendor.VkCommandBufferBeginQueryIndexedDelegate commandDelegate = commandCache.Cache.vkCmdBeginQueryIndexedEXT; commandDelegate(extendedHandle.handle, queryPool?.handle ?? default(SharpVk.Interop.QueryPool), query, marshalledFlags, index); } finally { Interop.HeapUtil.FreeAll(); } }