From ab8ca32770e5d393a30cd4ff4cc1da8be62228ea Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 2 Jul 2022 15:37:06 +0200 Subject: [PATCH] Add missing Assert() calls when submitting GPU work --- src/ComputeSharp/Graphics/Commands/CommandList.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp/Graphics/Commands/CommandList.cs b/src/ComputeSharp/Graphics/Commands/CommandList.cs index 61a69232..28494e84 100644 --- a/src/ComputeSharp/Graphics/Commands/CommandList.cs +++ b/src/ComputeSharp/Graphics/Commands/CommandList.cs @@ -1,6 +1,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading.Tasks; +using ComputeSharp.Core.Extensions; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using static TerraFX.Interop.DirectX.D3D12_COMMAND_LIST_TYPE; @@ -134,7 +135,7 @@ internal unsafe struct CommandList : IDisposable /// public void ExecuteAndWaitForCompletion() { - this.d3D12GraphicsCommandList.Get()->Close(); + this.d3D12GraphicsCommandList.Get()->Close().Assert(); this.device.ExecuteCommandList(ref this); } @@ -145,7 +146,7 @@ internal unsafe struct CommandList : IDisposable /// The to await for the operations to complete. public ValueTask ExecuteAndWaitForCompletionAsync() { - this.d3D12GraphicsCommandList.Get()->Close(); + this.d3D12GraphicsCommandList.Get()->Close().Assert(); return this.device.ExecuteCommandListAsync(ref this); }