From 2afd05005cde09dd691837ab1910260bdf98aa84 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 13 Apr 2025 10:11:25 -0700 Subject: [PATCH] Improve XML docs for 'EffectFactory' --- .../Interfaces/Descriptors/ID2D1PixelShaderDescriptor{T}.cs | 3 ++- .../Shaders/Interop/D2D1PixelShaderEffect.cs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp.D2D1/Interfaces/Descriptors/ID2D1PixelShaderDescriptor{T}.cs b/src/ComputeSharp.D2D1/Interfaces/Descriptors/ID2D1PixelShaderDescriptor{T}.cs index 7cd7cbbc..48f880f2 100644 --- a/src/ComputeSharp.D2D1/Interfaces/Descriptors/ID2D1PixelShaderDescriptor{T}.cs +++ b/src/ComputeSharp.D2D1/Interfaces/Descriptors/ID2D1PixelShaderDescriptor{T}.cs @@ -60,7 +60,8 @@ public interface ID2D1PixelShaderDescriptor /// This only applies to effects created from . /// /// - /// The returned function pointer should have a signature matching PD2D1_EFFECT_FACTORY. + /// The returned function pointer should have a signature matching PD2D1_EFFECT_FACTORY, + /// and it should point to a method calling . Using other D2D effect implementations is not a supported scenario, and might not work correctly. /// /// static abstract nint EffectFactory { get; } diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs index b4bf83a2..b341f72a 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs @@ -86,8 +86,11 @@ public static unsafe class D2D1PixelShaderEffect /// /// /// This method is guaranteed to never throw an exception, and can be used directly in a method exported to native code. + /// + /// /// The main use case scenario for calling is to produce the factory for - /// ID2D1Factory1::RegisterEffectFromString. + /// ID2D1Factory1::RegisterEffectFromString, + /// which should then be returned from implementations (either generated or manually authored). /// /// public static int CreateEffectUnsafe(void** effectImpl)