mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
boids: use div_ceil to calculate work group count (#8506)
This commit is contained in:
parent
f14458b067
commit
0290f085b2
@ -226,8 +226,7 @@ impl crate::framework::Example for Example {
|
||||
}
|
||||
|
||||
// calculates number of work groups from PARTICLES_PER_GROUP constant
|
||||
let work_group_count =
|
||||
((NUM_PARTICLES as f32) / (PARTICLES_PER_GROUP as f32)).ceil() as u32;
|
||||
let work_group_count = NUM_PARTICLES.div_ceil(PARTICLES_PER_GROUP);
|
||||
|
||||
// returns Example struct and No encoder commands
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user