add validation check that all work group dimension counts are >= 1

pull/34/head
Caleb Cornett 2022-11-12 19:35:27 -05:00
parent 5533eeb2fd
commit 1f8dfbbfd4
1 changed files with 5 additions and 0 deletions

View File

@ -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(