1 親
ba8150452c
コミット
6a83c6827d
5ファイル変更
+15
-15
検索条件に一致するファイルはありません
+2
-2
@@ -45,9 +45,9 @@ partial class ID2D1ShaderGenerator
|
||||
int index = (int)attributeData.ConstructorArguments[0].Value!;
|
||||
D2D1Filter filter = (D2D1Filter)attributeData.ConstructorArguments[1].Value!;
|
||||
|
||||
_ = attributeData.TryGetNamedArgument("LevelOfDetail", out int levelOfDetail);
|
||||
_ = attributeData.TryGetNamedArgument("LevelOfDetailCount", out int levelOfDetailCount);
|
||||
|
||||
inputDescriptionsBuilder.Add(new InputDescription((uint)index, filter, levelOfDetail));
|
||||
inputDescriptionsBuilder.Add(new InputDescription((uint)index, filter, levelOfDetailCount));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -37,5 +37,5 @@ public sealed class D2DInputDescriptionAttribute : Attribute
|
||||
/// <summary>
|
||||
/// Gets the mip level to retrieve from the upstream transform, if specified.
|
||||
/// </summary>
|
||||
public int LevelOfDetail { get; init; }
|
||||
public int LevelOfDetailCount { get; init; }
|
||||
}
|
||||
@@ -16,12 +16,12 @@ public readonly struct D2D1InputDescription
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the resource the description belongs to.</param>
|
||||
/// <param name="filter">The type of filter to apply to the input texture.</param>
|
||||
/// <param name="levelOfDetail">The mip level to retrieve from the upstream transform, if specified.</param>
|
||||
internal D2D1InputDescription(int index, D2D1Filter filter, int levelOfDetail)
|
||||
/// <param name="levelOfDetailCount">The mip level to retrieve from the upstream transform, if specified.</param>
|
||||
internal D2D1InputDescription(int index, D2D1Filter filter, int levelOfDetailCount)
|
||||
{
|
||||
Index = index;
|
||||
Filter = filter;
|
||||
LevelOfDetail = levelOfDetail;
|
||||
LevelOfDetailCount = levelOfDetailCount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -37,5 +37,5 @@ public readonly struct D2D1InputDescription
|
||||
/// <summary>
|
||||
/// Gets the mip level to retrieve from the upstream transform, if specified.
|
||||
/// </summary>
|
||||
public int LevelOfDetail { get; }
|
||||
public int LevelOfDetailCount { get; }
|
||||
}
|
||||
+1
-1
@@ -340,7 +340,7 @@ partial struct PixelShaderEffect
|
||||
|
||||
D2D1_INPUT_DESCRIPTION d2D1InputDescription;
|
||||
d2D1InputDescription.filter = (D2D1_FILTER)inputDescription.Filter;
|
||||
d2D1InputDescription.levelOfDetailCount = (uint)inputDescription.LevelOfDetail;
|
||||
d2D1InputDescription.levelOfDetailCount = (uint)inputDescription.LevelOfDetailCount;
|
||||
|
||||
hresult = drawInfo->SetInputDescription((uint)inputDescription.Index, d2D1InputDescription);
|
||||
|
||||
|
||||
@@ -128,23 +128,23 @@ public partial class D2D1InteropServicesTests
|
||||
|
||||
Assert.AreEqual(span[0].Index, 0);
|
||||
Assert.AreEqual(span[0].Filter, D2D1Filter.MinPointMagLinearMipPoint);
|
||||
Assert.AreEqual(span[0].LevelOfDetail, 0);
|
||||
Assert.AreEqual(span[0].LevelOfDetailCount, 0);
|
||||
|
||||
Assert.AreEqual(span[1].Index, 1);
|
||||
Assert.AreEqual(span[1].Filter, D2D1Filter.Anisotropic);
|
||||
Assert.AreEqual(span[1].LevelOfDetail, 0);
|
||||
Assert.AreEqual(span[1].LevelOfDetailCount, 0);
|
||||
|
||||
Assert.AreEqual(span[2].Index, 2);
|
||||
Assert.AreEqual(span[2].Filter, D2D1Filter.MinLinearMagPointMinLinear);
|
||||
Assert.AreEqual(span[2].LevelOfDetail, 4);
|
||||
Assert.AreEqual(span[2].LevelOfDetailCount, 4);
|
||||
|
||||
Assert.AreEqual(span[3].Index, 5);
|
||||
Assert.AreEqual(span[3].Filter, D2D1Filter.MinMagPointMipLinear);
|
||||
Assert.AreEqual(span[3].LevelOfDetail, 0);
|
||||
Assert.AreEqual(span[3].LevelOfDetailCount, 0);
|
||||
|
||||
Assert.AreEqual(span[4].Index, 6);
|
||||
Assert.AreEqual(span[4].Filter, D2D1Filter.MinPointMagMipLinear);
|
||||
Assert.AreEqual(span[4].LevelOfDetail, 3);
|
||||
Assert.AreEqual(span[4].LevelOfDetailCount, 3);
|
||||
}
|
||||
|
||||
[D2DInputCount(7)]
|
||||
@@ -156,9 +156,9 @@ public partial class D2D1InteropServicesTests
|
||||
[D2DInputSimple(6)]
|
||||
[D2DInputDescription(0, D2D1Filter.MinPointMagLinearMipPoint)]
|
||||
[D2DInputDescription(1, D2D1Filter.Anisotropic)]
|
||||
[D2DInputDescription(2, D2D1Filter.MinLinearMagPointMinLinear, LevelOfDetail = 4)]
|
||||
[D2DInputDescription(2, D2D1Filter.MinLinearMagPointMinLinear, LevelOfDetailCount = 4)]
|
||||
[D2DInputDescription(5, D2D1Filter.MinMagPointMipLinear)]
|
||||
[D2DInputDescription(6, D2D1Filter.MinPointMagMipLinear, LevelOfDetail = 3)]
|
||||
[D2DInputDescription(6, D2D1Filter.MinPointMagMipLinear, LevelOfDetailCount = 3)]
|
||||
partial struct ShaderWithInputDescriptions : ID2D1PixelShader
|
||||
{
|
||||
public Float4 Execute()
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする