Added method to get waiting pipelines IDs from pipeline cache. (#12874)
# Objective - Add a way to easily get currently waiting pipelines IDs. ## Solution - Added a method to get waiting pipelines `CachedPipelineId`. --------- Co-authored-by: James Liu <contact@jamessliu.com>
This commit is contained in:
		
							parent
							
								
									a4ed1b88b8
								
							
						
					
					
						commit
						c233d6e0d0
					
				| @ -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<Item = &CachedPipeline> { | ||||
|         self.pipelines.iter() | ||||
|     } | ||||
| 
 | ||||
|     /// Returns a iterator of the IDs of all currently waiting pipelines.
 | ||||
|     pub fn waiting_pipelines(&self) -> impl Iterator<Item = CachedPipelineId> + '_ { | ||||
|         self.waiting_pipelines.iter().copied() | ||||
|     } | ||||
| 
 | ||||
|     /// Create a new pipeline cache associated with the given render device.
 | ||||
|     pub fn new( | ||||
|         device: RenderDevice, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Remi Godin
						Remi Godin