Minor code tweaks, reduced texture object sizes
このコミットが含まれているのは:
1 親
63c0109128
コミット
341a23e65e
4ファイル変更
+10
-20
検索条件に一致するファイルはありません
@@ -78,8 +78,6 @@ namespace ComputeSharp.Resources
|
||||
}
|
||||
|
||||
GraphicsDevice = device;
|
||||
Width = width;
|
||||
Height = height;
|
||||
|
||||
this.d3D12Resource = device.D3D12Device->CreateCommittedResource(
|
||||
resourceType,
|
||||
@@ -123,12 +121,12 @@ namespace ComputeSharp.Resources
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
public int Width { get; }
|
||||
public int Width => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Width;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height of the current texture.
|
||||
/// </summary>
|
||||
public int Height { get; }
|
||||
public int Height => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Height;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ID3D12Resource"/> instance currently mapped.
|
||||
|
||||
@@ -80,9 +80,6 @@ namespace ComputeSharp.Resources
|
||||
}
|
||||
|
||||
GraphicsDevice = device;
|
||||
Width = width;
|
||||
Height = height;
|
||||
Depth = depth;
|
||||
|
||||
this.d3D12Resource = device.D3D12Device->CreateCommittedResource(
|
||||
resourceType,
|
||||
@@ -128,17 +125,17 @@ namespace ComputeSharp.Resources
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
public int Width { get; }
|
||||
public int Width => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Width;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height of the current texture.
|
||||
/// </summary>
|
||||
public int Height { get; }
|
||||
public int Height => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Height;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the depth of the current texture.
|
||||
/// </summary>
|
||||
public int Depth { get; }
|
||||
public int Depth => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Depth;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ID3D12Resource"/> instance currently mapped.
|
||||
|
||||
@@ -54,8 +54,6 @@ namespace ComputeSharp.Resources
|
||||
}
|
||||
|
||||
GraphicsDevice = device;
|
||||
Width = width;
|
||||
Height = height;
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
@@ -77,12 +75,12 @@ namespace ComputeSharp.Resources
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
public int Width { get; }
|
||||
public int Width => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Width;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height of the current texture.
|
||||
/// </summary>
|
||||
public int Height { get; }
|
||||
public int Height => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Height;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ID3D12Resource"/> instance currently mapped.
|
||||
|
||||
@@ -56,9 +56,6 @@ namespace ComputeSharp.Resources
|
||||
}
|
||||
|
||||
GraphicsDevice = device;
|
||||
Width = width;
|
||||
Height = height;
|
||||
Depth = depth;
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
@@ -81,16 +78,16 @@ namespace ComputeSharp.Resources
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
public int Width { get; }
|
||||
public int Width => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Width;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the height of the current texture.
|
||||
/// </summary>
|
||||
public int Height { get; }
|
||||
public int Height => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Height;
|
||||
/// <summary>
|
||||
/// Gets the depth of the current texture.
|
||||
/// </summary>
|
||||
public int Depth { get; }
|
||||
public int Depth => (int)this.d3D12PlacedSubresourceFootprint.Footprint.Depth;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ID3D12Resource"/> instance currently mapped.
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする