/// <summary> /// Insert a marker label into a command buffer. /// <para>Allows insertion of a single label within a command buffer.</para> /// </summary> /// <param name="commandBuffer">The command buffer into which the command is recorded.</param> /// <param name="markerInfo">Specifies the parameters of the marker to insert.</param> public static void CmdDebugMarkerInsertExt(this CommandBuffer commandBuffer, DebugMarkerMarkerInfoExt markerInfo) { int byteCount = Interop.String.GetMaxByteCount(markerInfo.MarkerName); var markerNamePtr = stackalloc byte[byteCount]; Interop.String.ToPointer(markerInfo.MarkerName, markerNamePtr, byteCount); markerInfo.ToNative(out DebugMarkerMarkerInfoExt.Native nativeMarkerInfo, markerNamePtr); vkCmdDebugMarkerInsertEXT(commandBuffer)(commandBuffer, &nativeMarkerInfo); }
/// <summary> /// Insert a marker label into a command buffer. /// <para>Allows insertion of a single label within a command buffer.</para> /// </summary> /// <param name="commandBuffer">The command buffer into which the command is recorded.</param> /// <param name="markerInfo">Specifies the parameters of the marker to insert.</param> public static void CmdDebugMarkerInsertExt(this CommandBuffer commandBuffer, DebugMarkerMarkerInfoExt markerInfo) { var proc = commandBuffer.Parent.Parent.GetProc <CmdDebugMarkerInsertExtDelegate>("vkCmdDebugMarkerInsertEXT"); int byteCount = Interop.String.GetMaxByteCount(markerInfo.MarkerName); var markerNamePtr = stackalloc byte[byteCount]; Interop.String.ToPointer(markerInfo.MarkerName, markerNamePtr, byteCount); markerInfo.ToNative(out DebugMarkerMarkerInfoExt.Native nativeMarkerInfo, markerNamePtr); proc(commandBuffer, &nativeMarkerInfo); }