diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs
index 101affef..76d4cf26 100644
--- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs
+++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1PixelShaderEffect.cs
@@ -514,4 +514,22 @@ public static unsafe class D2D1PixelShaderEffect
Unsafe.AsRef(in shader).LoadDispatchData(ref dataLoader);
}
+
+ ///
+ /// Sets the resource texture manager from an input D2D1 effect, by calling ID2D1Effect::SetValue.
+ ///
+ /// A pointer to the ID2D1Effect instance to use.
+ /// The input ID2D1ResourceTextureManager object (see ).
+ /// The index of the resource texture to assign the resource texture manager to.
+ /// For more info, see .
+ public static void SetResourceTextureManagerForD2D1Effect(void* d2D1Effect, void* resourceTextureManager, int index)
+ {
+ // TODO: validate args
+
+ ((ID2D1Effect*)d2D1Effect)->SetValue(
+ index: D2D1PixelShaderEffectProperty.ResourceTextureManager0 + (uint)index,
+ type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_IUNKNOWN,
+ data: (byte*)&resourceTextureManager,
+ dataSize: (uint)sizeof(void*));
+ }
}
diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs
index e7c40874..993104bc 100644
--- a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs
+++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1_1/D2D1_PROPERTY_TYPE.cs
@@ -7,6 +7,7 @@ namespace TerraFX.Interop.DirectX
{
internal enum D2D1_PROPERTY_TYPE : uint
{
- D2D1_PROPERTY_TYPE_BLOB = 9
+ D2D1_PROPERTY_TYPE_BLOB = 9,
+ D2D1_PROPERTY_TYPE_IUNKNOWN = 10
}
}
\ No newline at end of file