Skip to content

Commit 405fedb

Browse files
refactor: use Iterator::any for max_compute_workgroups_per_dimension check (gfx-rs#9194)
1 parent da77a43 commit 405fedb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

wgpu-core/src/command/compute.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,10 +843,7 @@ fn dispatch(state: &mut State, groups: [u32; 3]) -> Result<(), ComputePassErrorI
843843
.limits
844844
.max_compute_workgroups_per_dimension;
845845

846-
if groups[0] > groups_size_limit
847-
|| groups[1] > groups_size_limit
848-
|| groups[2] > groups_size_limit
849-
{
846+
if groups.iter().copied().any(|g| g > groups_size_limit) {
850847
return Err(ComputePassErrorInner::Dispatch(
851848
DispatchError::InvalidGroupSize {
852849
current: groups,

0 commit comments

Comments
 (0)