/// <summary>
 /// Set markers into the command buffer.
 /// </summary>
 /// <param name="extendedHandle">
 /// The CommandBuffer handle to extend.
 /// </param>
 /// <param name="markerInfo">
 /// The performance markers to set.
 /// </param>
 public static unsafe void SetPerformanceMarker(this SharpVk.CommandBuffer extendedHandle, SharpVk.Intel.PerformanceMarkerInfo markerInfo)
 {
     try
     {
         CommandCache commandCache = default(CommandCache);
         SharpVk.Interop.Intel.PerformanceMarkerInfo *marshalledMarkerInfo = default(SharpVk.Interop.Intel.PerformanceMarkerInfo *);
         commandCache         = extendedHandle.commandCache;
         marshalledMarkerInfo = (SharpVk.Interop.Intel.PerformanceMarkerInfo *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Intel.PerformanceMarkerInfo>());
         markerInfo.MarshalTo(marshalledMarkerInfo);
         SharpVk.Interop.Intel.VkCommandBufferSetPerformanceMarkerDelegate commandDelegate = commandCache.Cache.vkCmdSetPerformanceMarkerINTEL;
         Result methodResult = commandDelegate(extendedHandle.handle, marshalledMarkerInfo);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 internal unsafe void MarshalTo(SharpVk.Interop.Intel.PerformanceMarkerInfo *pointer)
 {
     pointer->SType  = StructureType.PerformanceMarkerInfo;
     pointer->Next   = null;
     pointer->Marker = this.Marker;
 }