diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index f24ab7d8b5..bd20f44e2e 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -494,10 +494,16 @@ pub struct PipelineCache { } impl PipelineCache { + /// Returns an iterator over the pipelines in the pipeline cache. pub fn pipelines(&self) -> impl Iterator { self.pipelines.iter() } + /// Returns a iterator of the IDs of all currently waiting pipelines. + pub fn waiting_pipelines(&self) -> impl Iterator + '_ { + self.waiting_pipelines.iter().copied() + } + /// Create a new pipeline cache associated with the given render device. pub fn new( device: RenderDevice,