using System.Runtime.InteropServices; using TerraFX.Interop.DirectX; namespace ComputeSharp.Interop; /// /// A collection of native bindings for PIX APIs (see ). /// internal static unsafe partial class Pix { /// /// Starts a PIX event on a target object. /// /// C export: typedef void(WINAPI* BeginEventOnCommandList)(ID3D12GraphicsCommandList* commandList, UINT64 color, _In_ PCSTR formatString). /// /// /// The target object. /// The color to use for the event. /// The format string to use for the event (in ANSI format, -terminated). [DllImport("WinPixEventRuntime", ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] public static extern void PIXBeginEventOnCommandList(ID3D12GraphicsCommandList* commandList, ulong color, sbyte* formatString); /// /// Ends a PIX event on a target object. /// /// C export: typedef void(WINAPI* EndEventOnCommandList)(ID3D12GraphicsCommandList* commandList). /// /// /// The target object. [DllImport("WinPixEventRuntime", ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] public static extern void PIXEndEventOnCommandList(ID3D12GraphicsCommandList* commandList); /// /// Sets a PIX marker on a target object. /// /// C export: typedef void(WINAPI* SetMarkerOnCommandList)(ID3D12GraphicsCommandList* commandList, UINT64 color, _In_ PCSTR formatString). /// /// /// The target object. /// The color to use for the marker. /// The format string to use for the marker (in ANSI format, -terminated). [DllImport("WinPixEventRuntime", ExactSpelling = true, CallingConvention = CallingConvention.Winapi)] public static extern void PIXSetMarkerOnCommandList(ID3D12GraphicsCommandList* commandList, ulong color, sbyte* formatString); }