Add TransformMapperManager property

このコミットが含まれているのは:
Sergio Pedri committed 2022-11-29 22:34:05 +01:00
1 親 48a368164c
コミット 8c1e1961ca
3ファイル変更
+32 -4

検索条件に一致するファイルはありません

+17 -3
ファイルの表示
@@ -165,6 +165,9 @@ public static unsafe class D2D1PixelShaderEffect
<Property name='ResourceTextureManager15' type='iunknown'>
<Property name='DisplayName' type='string' value='ResourceTextureManager15'/>
</Property>
<Property name='TransformMapperManager' type='iunknown'>
<Property name='DisplayName' type='string' value='TransformMapperManager'/>
</Property>
</Effect>
""");
@@ -189,9 +192,10 @@ public static unsafe class D2D1PixelShaderEffect
fixed (char* pResourceTextureManager13PropertyName = "ResourceTextureManager13")
fixed (char* pResourceTextureManager14PropertyName = "ResourceTextureManager14")
fixed (char* pResourceTextureManager15PropertyName = "ResourceTextureManager15")
fixed (char* pTransformMapperManagerPropertyName = nameof(D2D1PixelShaderEffectProperty.TransformMapperManager))
{
// Prepare the effect binding functions
D2D1_PROPERTY_BINDING* d2D1PropertyBinding = stackalloc D2D1_PROPERTY_BINDING[17];
D2D1_PROPERTY_BINDING* d2D1PropertyBinding = stackalloc D2D1_PROPERTY_BINDING[18];
// Property names
d2D1PropertyBinding[0].propertyName = (ushort*)pBufferPropertyName;
@@ -211,6 +215,7 @@ public static unsafe class D2D1PixelShaderEffect
d2D1PropertyBinding[14].propertyName = (ushort*)pResourceTextureManager13PropertyName;
d2D1PropertyBinding[15].propertyName = (ushort*)pResourceTextureManager14PropertyName;
d2D1PropertyBinding[16].propertyName = (ushort*)pResourceTextureManager15PropertyName;
d2D1PropertyBinding[17].propertyName = (ushort*)pTransformMapperManagerPropertyName;
// Property getters
d2D1PropertyBinding[0].getFunction = PixelShaderEffect.GetConstantBuffer;
@@ -230,6 +235,7 @@ public static unsafe class D2D1PixelShaderEffect
d2D1PropertyBinding[14].getFunction = PixelShaderEffect.GetResourceTextureManager13;
d2D1PropertyBinding[15].getFunction = PixelShaderEffect.GetResourceTextureManager14;
d2D1PropertyBinding[16].getFunction = PixelShaderEffect.GetResourceTextureManager15;
d2D1PropertyBinding[17].getFunction = PixelShaderEffect.GetTransformMapperManager;
// Property setters
d2D1PropertyBinding[0].setFunction = PixelShaderEffect.SetConstantBuffer;
@@ -249,6 +255,7 @@ public static unsafe class D2D1PixelShaderEffect
d2D1PropertyBinding[14].setFunction = PixelShaderEffect.SetResourceTextureManager13;
d2D1PropertyBinding[15].setFunction = PixelShaderEffect.SetResourceTextureManager14;
d2D1PropertyBinding[16].setFunction = PixelShaderEffect.SetResourceTextureManager15;
d2D1PropertyBinding[17].setFunction = PixelShaderEffect.SetTransformMapperManager;
fixed (Guid* pGuid = &PixelShaderEffect.For<T>.Id)
{
@@ -257,7 +264,7 @@ public static unsafe class D2D1PixelShaderEffect
classId: pGuid,
propertyXml: (ushort*)pXml,
bindings: d2D1PropertyBinding,
bindingsCount: 17,
bindingsCount: 18,
effectFactory: PixelShaderEffect.For<T>.Factory).Assert();
}
@@ -432,6 +439,9 @@ public static unsafe class D2D1PixelShaderEffect
<Property name='ResourceTextureManager15' type='iunknown'>
<Property name='DisplayName' type='string' value='ResourceTextureManager15'/>
</Property>
<Property name='TransformMapperManager' type='iunknown'>
<Property name='DisplayName' type='string' value='TransformMapperManager'/>
</Property>
</Effect>
"""u8);
@@ -439,7 +449,7 @@ public static unsafe class D2D1PixelShaderEffect
writer.WriteRaw((byte)'\0');
// Bindings
writer.WriteRaw(17);
writer.WriteRaw(18);
writer.WriteRaw("ConstantBuffer"u8);
writer.WriteRaw((byte)'\0');
writer.WriteRaw((nint)PixelShaderEffect.GetConstantBuffer);
@@ -508,6 +518,10 @@ public static unsafe class D2D1PixelShaderEffect
writer.WriteRaw((byte)'\0');
writer.WriteRaw((nint)PixelShaderEffect.GetResourceTextureManager15);
writer.WriteRaw((nint)PixelShaderEffect.SetResourceTextureManager15);
writer.WriteRaw("TransformMapperManager"u8);
writer.WriteRaw((byte)'\0');
writer.WriteRaw((nint)PixelShaderEffect.GetTransformMapperManager);
writer.WriteRaw((nint)PixelShaderEffect.SetTransformMapperManager);
// Effect factory
writer.WriteRaw((nint)PixelShaderEffect.For<T>.Factory);
+10
ファイルの表示
@@ -112,4 +112,14 @@ public static class D2D1PixelShaderEffectProperty
/// </summary>
/// <remarks>For more info, see <see cref="D2D1ResourceTextureManager"/>.</remarks>
public const uint ResourceTextureManager15 = 16;
/// <summary>
/// The index for the <c>ID2D1TransformMapperManager</c> property of a <see cref="D2D1PixelShaderEffect"/> object.
/// </summary>
/// <remarks>
/// <para>The value of this property is of type <c>D2D1_PROPERTY_TYPE_BLOB</c>.</para>
/// <para>This value can be passed when calling <c>ID2D1Effect::SetValue</c>.</para>
/// <para>For more info, see <see href="https://learn.microsoft.com/en-us/windows/win32/api/d2d1_1/nf-d2d1_1-id2d1properties-setvalue(uint32_d2d1_property_type_constbyte_uint32)"/>.</para>
/// </remarks>
public const uint TransformMapperManager = 17;
}
+5 -1
ファイルの表示
@@ -17,7 +17,7 @@ public partial class D2D1EffectRegistrationDataTests
Assert.AreEqual(effectId, data.ClassId);
Assert.AreEqual(2, data.NumberOfInputs);
Assert.IsTrue(data.EffectFactory is not null);
Assert.AreEqual(17, data.PropertyBindings.Length);
Assert.AreEqual(18, data.PropertyBindings.Length);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ConstantBuffer), data.PropertyBindings.Span[0].PropertyName);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager0), data.PropertyBindings.Span[1].PropertyName);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager1), data.PropertyBindings.Span[2].PropertyName);
@@ -35,6 +35,7 @@ public partial class D2D1EffectRegistrationDataTests
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager13), data.PropertyBindings.Span[14].PropertyName);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager14), data.PropertyBindings.Span[15].PropertyName);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.ResourceTextureManager15), data.PropertyBindings.Span[16].PropertyName);
Assert.AreEqual(nameof(D2D1PixelShaderEffectProperty.TransformMapperManager), data.PropertyBindings.Span[17].PropertyName);
foreach (ref readonly D2D1PropertyBinding propertyBinding in data.PropertyBindings.Span)
{
@@ -104,6 +105,9 @@ public partial class D2D1EffectRegistrationDataTests
<Property name='ResourceTextureManager15' type='iunknown'>
<Property name='DisplayName' type='string' value='ResourceTextureManager15'/>
</Property>
<Property name='TransformMapperManager' type='iunknown'>
<Property name='DisplayName' type='string' value='TransformMapperManager'/>
</Property>
</Effect>
""", data.PropertyXml);
}