Fixed concurrent GPU dispatche glitches
このコミットが含まれているのは:
1 親
b10189ba6f
コミット
c474682c19
1ファイル変更
+5
-17
@@ -18,11 +18,6 @@ namespace ComputeSharp.Graphics
|
||||
/// </summary>
|
||||
public const Direct3DFeatureLevel FeatureLevel = Direct3DFeatureLevel.Level_12_1;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="System.Threading.AutoResetEvent"/> instance used to wait for completion when executing commands
|
||||
/// </summary>
|
||||
private readonly AutoResetEvent AutoResetEvent = new AutoResetEvent(false);
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ID3D12CommandQueue"/> instance to use for compute operations
|
||||
/// </summary>
|
||||
@@ -126,11 +121,6 @@ namespace ComputeSharp.Graphics
|
||||
/// </summary>
|
||||
internal ID3D12Fence NativeDirectFence { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="object"/> used to lock command list executions
|
||||
/// </summary>
|
||||
private readonly object Lock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the next fence value for compute operations
|
||||
/// </summary>
|
||||
@@ -174,11 +164,11 @@ namespace ComputeSharp.Graphics
|
||||
|
||||
if (fenceValue <= fence.CompletedValue) return;
|
||||
|
||||
lock (Lock)
|
||||
{
|
||||
fence.SetEventOnCompletion(fenceValue, AutoResetEvent.SafeWaitHandle.DangerousGetHandle());
|
||||
AutoResetEvent.WaitOne();
|
||||
}
|
||||
using ManualResetEvent fenceEvent = new ManualResetEvent(false);
|
||||
|
||||
fence.SetEventOnCompletion(fenceValue, fenceEvent);
|
||||
|
||||
fenceEvent.WaitOne();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -244,8 +234,6 @@ namespace ComputeSharp.Graphics
|
||||
NativeDirectFence.Dispose();
|
||||
|
||||
NativeDevice.Dispose();
|
||||
|
||||
AutoResetEvent.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする