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

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/MoonWorks#34
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
moar-validation
TheSpydog 2022-11-14 18:21:03 +00:00 committed by cosmonaut
parent 5533eeb2fd
commit c2ef78d136
1 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,11 @@ namespace MoonWorks.Graphics
{ {
#if DEBUG #if DEBUG
AssertComputePipelineBound(); AssertComputePipelineBound();
if (groupCountX < 1 || groupCountY < 1 || groupCountZ < 1)
{
throw new ArgumentException("All dimensions for the compute work group must be >= 1!");
}
#endif #endif
Refresh.Refresh_DispatchCompute( Refresh.Refresh_DispatchCompute(