From 1f8dfbbfd46ed900e7f8abb583eb6c9e639c23b1 Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Sat, 12 Nov 2022 19:35:27 -0500 Subject: [PATCH] add validation check that all work group dimension counts are >= 1 --- src/Graphics/CommandBuffer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index 923e766..7782c2c 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -211,6 +211,11 @@ namespace MoonWorks.Graphics { #if DEBUG AssertComputePipelineBound(); + + if (groupCountX < 1 || groupCountY < 1 || groupCountZ < 1) + { + throw new ArgumentException("All dimensions for the compute work group must be >= 1!"); + } #endif Refresh.Refresh_DispatchCompute( -- 2.25.1