Delegate layer_count logic to primitive pipelines

This commit is contained in:
Héctor Ramón Jiménez 2025-01-26 03:42:26 +01:00
parent c90d153976
commit 2c733d96ac
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 17 additions and 12 deletions

View file

@ -302,6 +302,13 @@ impl Pipeline {
}
}
pub fn layer_count(batch: &Batch) -> usize {
batch
.iter()
.filter(|item| matches!(item, Item::Group { .. }))
.count()
}
pub fn prepare(
&mut self,
device: &wgpu::Device,