mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 14:31:08 +01:00
refactor: use Iterator::any for max_compute_workgroups_per_dimension check (#9194)
This commit is contained in:
1 parent
da77a43313
commit
405fedbb05
1 file changed
+1
-4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user