refactor: use Iterator::any for max_compute_workgroups_per_dimension check (#9194)

This commit is contained in:
Erich Gubler authored and GitHub committed 2026-03-11 11:39:05 -04:00
1 parent da77a43313
commit 405fedbb05
1 file changed
+1 -4
+1 -4
View File
@@ -843,10 +843,7 @@ fn dispatch(state: &mut State, groups: [u32; 3]) -> Result<(), ComputePassErrorI
.limits
.max_compute_workgroups_per_dimension;
if groups[0] > groups_size_limit
|| groups[1] > groups_size_limit
|| groups[2] > groups_size_limit
{
if groups.iter().copied().any(|g| g > groups_size_limit) {
return Err(ComputePassErrorInner::Dispatch(
DispatchError::InvalidGroupSize {
current: groups,