diff --git a/src/ComputeSharp.D2D1Interop/Interfaces/ID2D1PixelShader.cs b/src/ComputeSharp.D2D1Interop/Interfaces/ID2D1PixelShader.cs index eba1c46b..3c7207f5 100644 --- a/src/ComputeSharp.D2D1Interop/Interfaces/ID2D1PixelShader.cs +++ b/src/ComputeSharp.D2D1Interop/Interfaces/ID2D1PixelShader.cs @@ -5,14 +5,13 @@ namespace ComputeSharp.D2D1Interop; /// -/// An representing a pixel shader. +/// An representing a D2D1 pixel shader. /// -public interface IPixelShader : ID2D1Shader - where TPixel : unmanaged +public interface ID2D1PixelShader : ID2D1Shader { /// /// Executes the current pixel shader. /// /// The pixel value for the current invocation. - TPixel Execute(); + Float4 Execute(); } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1Interop/Shaders/Interop/InteropServices.cs b/src/ComputeSharp.D2D1Interop/Shaders/Interop/InteropServices.cs index a93dfcc8..7b289a70 100644 --- a/src/ComputeSharp.D2D1Interop/Shaders/Interop/InteropServices.cs +++ b/src/ComputeSharp.D2D1Interop/Shaders/Interop/InteropServices.cs @@ -27,7 +27,7 @@ public static class InteropServices /// If the shader was compiled at runtime, will wrap a array with the bytecode. /// public static unsafe void LoadShaderBytecode(in T shader, out ReadOnlyMemory bytecode) - where T : struct, ID2D1Shader + where T : unmanaged, ID2D1PixelShader { D2D1ShaderBytecodeLoader bytecodeLoader = default; @@ -56,7 +56,7 @@ public static class InteropServices /// A pointer to the ID2D1DrawInfo instance to use. /// For more info, see . public static unsafe void SetPixelShaderConstantBufferForD2D1DrawInfo(in T shader, void* d2D1DrawInfo) - where T : struct, ID2D1Shader + where T : unmanaged, ID2D1PixelShader { D2D1DrawInfoDispatchDataLoader dataLoader = new((ID2D1DrawInfo*)d2D1DrawInfo);