Initial Texture3D<T> get/set support for whole volume
このコミットが含まれているのは:
1 親
eef8e41899
コミット
251dddc17c
4ファイル変更
+274
-5
検索条件に一致するファイルはありません
@@ -402,6 +402,36 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
return d3D12GraphicsCommandList.Move();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the layout data for a target resource.
|
||||
/// </summary>
|
||||
/// <param name="d3D12Device">The target <see cref="ID3D12Device"/> to use to get the layout info.</param>
|
||||
/// <param name="d3D12ResourceDesc">The <see cref="D3D12_RESOURCE_DESC"/> value for the target resource.</param>
|
||||
/// <param name="d3D12PlacedSubresourceFootprint">The resulting layout info for the resource.</param>
|
||||
/// <param name="numRows">The number of rows in the resource.</param>
|
||||
/// <param name="rowSizeInBytes">The size in bytes of each row in the resource.</param>
|
||||
/// <param name="totalSizeInBytes">The total number of bytes for the resource.</param>
|
||||
public static void GetCopyableFootprint(
|
||||
this ref ID3D12Device d3D12Device,
|
||||
D3D12_RESOURCE_DESC* d3D12ResourceDesc,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out uint numRows,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes)
|
||||
{
|
||||
uint a;
|
||||
ulong b, c;
|
||||
|
||||
fixed (D3D12_PLACED_SUBRESOURCE_FOOTPRINT* p = &d3D12PlacedSubresourceFootprint)
|
||||
{
|
||||
d3D12Device.GetCopyableFootprints(d3D12ResourceDesc, 0, 1, 0, p, &a, &b, &c);
|
||||
}
|
||||
|
||||
numRows = a;
|
||||
rowSizeInBytes = b;
|
||||
totalSizeInBytes = c;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks the feature support of a given type for a given device.
|
||||
/// </summary>
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
width,
|
||||
height,
|
||||
depth,
|
||||
(elementSizeInBytes * width * depth + FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) & ~((uint)FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1));
|
||||
(elementSizeInBytes * width + FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) & ~((uint)FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1));
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
d3D12PlacedSubresourceFootprint.Offset = 0;
|
||||
d3D12PlacedSubresourceFootprint.Footprint = d3D12SubresourceFootprint;
|
||||
@@ -84,7 +84,7 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
width,
|
||||
height,
|
||||
depth,
|
||||
(elementSizeInBytes * width * depth + FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) & ~((uint)FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1));
|
||||
(elementSizeInBytes * width + FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) & ~((uint)FX.D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1));
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
d3D12PlacedSubresourceFootprint.Offset = 0;
|
||||
d3D12PlacedSubresourceFootprint.Footprint = d3D12SubresourceFootprint;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする