Removed unnecessary code
このコミットが含まれているのは:
1 親
c05ee1048c
コミット
8d0f17e01d
3ファイル変更
+3
-12
検索条件に一致するファイルはありません
@@ -46,11 +46,10 @@ namespace ComputeSharp.Graphics.Commands
|
||||
|
||||
long completedValue = CommandListType switch
|
||||
{
|
||||
CommandListType.Bundle => GraphicsDevice.NativeDirectFence.CompletedValue,
|
||||
CommandListType.Compute => GraphicsDevice.NativeComputeFence.CompletedValue,
|
||||
CommandListType.Copy => GraphicsDevice.NativeCopyFence.CompletedValue,
|
||||
CommandListType.Direct => GraphicsDevice.NativeDirectFence.CompletedValue,
|
||||
_ => throw new NotSupportedException("This command list type is not supported.")
|
||||
_ => throw new NotSupportedException($"Unsupported command list type with value {CommandListType}")
|
||||
};
|
||||
|
||||
if (fenceValue <= completedValue)
|
||||
|
||||
@@ -15,11 +15,10 @@ namespace ComputeSharp.Graphics.Commands
|
||||
{
|
||||
CommandAllocator = CommandListType switch
|
||||
{
|
||||
CommandListType.Bundle => GraphicsDevice.BundleAllocatorPool.GetCommandAllocator(),
|
||||
CommandListType.Compute => GraphicsDevice.ComputeAllocatorPool.GetCommandAllocator(),
|
||||
CommandListType.Copy => GraphicsDevice.CopyAllocatorPool.GetCommandAllocator(),
|
||||
CommandListType.Direct => GraphicsDevice.DirectAllocatorPool.GetCommandAllocator(),
|
||||
_ => throw new NotSupportedException("This command list type is not supported.")
|
||||
_ => throw new NotSupportedException($"Unsupported command list type with value {CommandListType}")
|
||||
};
|
||||
NativeCommandList = GraphicsDevice.NativeDevice.CreateCommandList(CommandListType, CommandAllocator, null);
|
||||
|
||||
@@ -105,9 +104,6 @@ namespace ComputeSharp.Graphics.Commands
|
||||
{
|
||||
switch (CommandListType)
|
||||
{
|
||||
case CommandListType.Bundle:
|
||||
GraphicsDevice.BundleAllocatorPool.Enqueue(CommandAllocator, GraphicsDevice.NextDirectFenceValue - 1);
|
||||
break;
|
||||
case CommandListType.Direct:
|
||||
GraphicsDevice.DirectAllocatorPool.Enqueue(CommandAllocator, GraphicsDevice.NextDirectFenceValue - 1);
|
||||
break;
|
||||
@@ -118,7 +114,7 @@ namespace ComputeSharp.Graphics.Commands
|
||||
GraphicsDevice.CopyAllocatorPool.Enqueue(CommandAllocator, GraphicsDevice.NextCopyFenceValue - 1);
|
||||
break;
|
||||
default:
|
||||
throw new NotSupportedException("This command list type is not supported.");
|
||||
throw new NotSupportedException($"Unsupported command list type with value {CommandListType}");
|
||||
}
|
||||
|
||||
NativeCommandList.Dispose();
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace ComputeSharp.Graphics
|
||||
NativeCopyCommandQueue = NativeDevice.CreateCommandQueue(new CommandQueueDescription(CommandListType.Copy));
|
||||
NativeDirectCommandQueue = NativeDevice.CreateCommandQueue(new CommandQueueDescription(CommandListType.Direct));
|
||||
|
||||
BundleAllocatorPool = new CommandAllocatorPool(this, CommandListType.Bundle);
|
||||
ComputeAllocatorPool = new CommandAllocatorPool(this, CommandListType.Compute);
|
||||
CopyAllocatorPool = new CommandAllocatorPool(this, CommandListType.Copy);
|
||||
DirectAllocatorPool = new CommandAllocatorPool(this, CommandListType.Direct);
|
||||
@@ -71,8 +70,6 @@ namespace ComputeSharp.Graphics
|
||||
/// </summary>
|
||||
internal DescriptorAllocator ShaderResourceViewAllocator { get; set; }
|
||||
|
||||
internal CommandAllocatorPool BundleAllocatorPool { get; }
|
||||
|
||||
internal CommandAllocatorPool ComputeAllocatorPool { get; }
|
||||
|
||||
internal CommandAllocatorPool CopyAllocatorPool { get; }
|
||||
@@ -183,7 +180,6 @@ namespace ComputeSharp.Graphics
|
||||
|
||||
ShaderResourceViewAllocator.Dispose();
|
||||
|
||||
BundleAllocatorPool.Dispose();
|
||||
ComputeAllocatorPool.Dispose();
|
||||
CopyAllocatorPool.Dispose();
|
||||
DirectAllocatorPool.Dispose();
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする