diff --git a/src/ComputeSharp.D2D1Interop/Shaders/Interop/D2D1InteropServices.cs b/src/ComputeSharp.D2D1Interop/Shaders/Interop/D2D1InteropServices.cs index f50cd61a..4ac188b8 100644 --- a/src/ComputeSharp.D2D1Interop/Shaders/Interop/D2D1InteropServices.cs +++ b/src/ComputeSharp.D2D1Interop/Shaders/Interop/D2D1InteropServices.cs @@ -15,6 +15,25 @@ namespace ComputeSharp.D2D1Interop.Interop; /// public static unsafe class D2D1InteropServices { + /// + /// Loads the bytecode from an input D2D1 pixel shader. + /// + /// This overload can be used for simplicity when the D2D1 shader does not rely on captured objects to + /// be processed correctly. This is the case when it does not contain any -s. + /// + /// + /// The type of D2D1 pixel shader to load the bytecode for. + /// A instance with the resulting shader bytecode. + /// + /// If the input shader was precompiled, will wrap a pinned memory buffer (from the PE section). + /// If the shader was compiled at runtime, will wrap a array with the bytecode. + /// + public static void LoadShaderBytecode(out ReadOnlyMemory bytecode) + where T : unmanaged, ID2D1PixelShader + { + LoadShaderBytecode(default(T), out bytecode); + } + /// /// Loads the bytecode from an input D2D1 pixel shader. ///