Minor code refactoring
このコミットが含まれているのは:
1 親
659b841784
コミット
3183771b66
5ファイル変更
+78
-33
検索条件に一致するファイルはありません
@@ -145,10 +145,10 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
Guard.IsGreaterThanOrEqualTo(size, (nint)width * height, nameof(size));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -220,10 +220,10 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(DXGIFormatHelper.GetForType<T>(), (ulong)destination.Width, (uint)destination.Height);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)destination.Width,
|
||||
(uint)destination.Height,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -277,10 +277,10 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
Guard.IsGreaterThanOrEqualTo(size, (nint)width * height, nameof(size));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -347,10 +347,10 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(DXGIFormatHelper.GetForType<T>(), (ulong)source.Width, (uint)source.Height);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)source.Width,
|
||||
(uint)source.Height,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
@@ -159,10 +159,11 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));
|
||||
Guard.IsGreaterThanOrEqualTo(size, (nint)width * height * depth, nameof(size));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height, (ushort)depth);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -242,10 +243,11 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height, (ushort)depth);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -304,10 +306,11 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));
|
||||
Guard.IsGreaterThanOrEqualTo(size, (nint)width * height * depth, nameof(size));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height, (ushort)depth);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
@@ -382,10 +385,11 @@ namespace ComputeSharp.Resources
|
||||
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
|
||||
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height, (ushort)depth);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
@@ -57,10 +57,10 @@ namespace ComputeSharp.Resources
|
||||
Width = width;
|
||||
Height = height;
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
@@ -60,10 +60,11 @@ namespace ComputeSharp.Resources
|
||||
Height = height;
|
||||
Depth = depth;
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(DXGIFormatHelper.GetForType<T>(), (ulong)width, (uint)height, (ushort)depth);
|
||||
|
||||
GraphicsDevice.D3D12Device->GetCopyableFootprint(
|
||||
&d3D12ResourceDescription,
|
||||
DXGIFormatHelper.GetForType<T>(),
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint,
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする