Add validation check that all work group dimension counts are >= 1 #34

Merged
cosmonaut merged 1 commits from TheSpydog/MoonWorks:workgroup into main 2022-11-14 18:21:04 +00:00
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(