Refactor ResourceDescriptor, add ResourceDescriptorRangeType

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-14 10:44:06 +02:00
1 親 30414faf40
コミット 104f216c61
7ファイル変更
+78 -92

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

+5 -24
ファイルの表示
@@ -12,21 +12,6 @@ namespace ComputeSharp.D2D1.Interop;
[StructLayout(LayoutKind.Sequential)]
public readonly struct D2D1InputDescription
{
/// <summary>
/// The index of the resource the description belongs to.
/// </summary>
private readonly int index;
/// <summary>
/// The type of filter to apply to the input texture.
/// </summary>
private readonly D2D1Filter filter;
/// <summary>
/// The mip level to retrieve from the upstream transform, if specified.
/// </summary>
private readonly int levelOfDetailCount;
/// <summary>
/// Creates a new <see cref="D2D1InputDescription"/> instance with the specified parameters.
/// </summary>
@@ -34,26 +19,22 @@ public readonly struct D2D1InputDescription
/// <param name="filter">The type of filter to apply to the input texture.</param>
public D2D1InputDescription(int index, D2D1Filter filter)
{
this.index = index;
this.filter = filter;
Index = index;
Filter = filter;
}
/// <summary>
/// Gets the index of the resource the description belongs to.
/// </summary>
public int Index => this.index;
public int Index { get; }
/// <summary>
/// Gets the type of filter to apply to the input texture.
/// </summary>
public D2D1Filter Filter => this.filter;
public D2D1Filter Filter { get; }
/// <summary>
/// Gets the mip level to retrieve from the upstream transform, if specified.
/// </summary>
public int LevelOfDetailCount
{
get => this.levelOfDetailCount;
init => this.levelOfDetailCount = value;
}
public int LevelOfDetailCount { get; init; }
}
+4 -15
ファイルの表示
@@ -8,17 +8,6 @@ namespace ComputeSharp.D2D1.Interop;
[StructLayout(LayoutKind.Sequential)]
public readonly struct D2D1ResourceTextureDescription
{
/// <summary>
/// The index of the resource texture the description belongs to.
/// </summary>
/// <remarks>See notes in <see cref="D2D1InputDescription"/> for why explicit fields are used here.</remarks>
private readonly int index;
/// <summary>
/// The number of dimensions of the resource texture the description belongs to.
/// </summary>
private readonly int dimensions;
/// <summary>
/// Creates a new <see cref="D2D1ResourceTextureDescription"/> instance with the specified parameters.
/// </summary>
@@ -26,17 +15,17 @@ public readonly struct D2D1ResourceTextureDescription
/// <param name="dimensions">The number of dimensions of the resource texture the description belongs to.</param>
public D2D1ResourceTextureDescription(int index, int dimensions)
{
this.index = index;
this.dimensions = dimensions;
Index = index;
Dimensions = dimensions;
}
/// <summary>
/// Gets the index of the resource texture the description belongs to.
/// </summary>
public int Index => this.index;
public int Index { get; }
/// <summary>
/// Gets the rank of the resource texture the description belongs to.
/// </summary>
public int Dimensions => this.dimensions;
public int Dimensions { get; }
}