fix render graph lifetimes
This commit is contained in:
		
							parent
							
								
									a0fa4d2d79
								
							
						
					
					
						commit
						0e18c4b70b
					
				| @ -29,12 +29,12 @@ impl<'a> RenderGraphBuilder<'a> { | ||||
|     } | ||||
| 
 | ||||
|     pub fn add_pipeline(&mut self, name: &str, build: impl Fn(&mut PipelineBuilder)) -> &mut Self { | ||||
|         if let Some(ref pass) = self.current_pass { | ||||
|             let mut pipeline_descriptor_storage = self | ||||
|                 .resources | ||||
|                 .get_mut::<AssetStorage<PipelineDescriptor>>() | ||||
|                 .unwrap(); | ||||
|             let mut shader_storage = self.resources.get_mut::<AssetStorage<Shader>>().unwrap(); | ||||
|         if let Some(ref pass) = self.current_pass { | ||||
|             let mut builder = PipelineBuilder::new(name, &mut shader_storage); | ||||
|             build(&mut builder); | ||||
|             let pipeline = builder.finish(); | ||||
| @ -55,6 +55,7 @@ impl<'a> RenderGraphBuilder<'a> { | ||||
|         name: &str, | ||||
|         build: impl Fn(&mut PipelineBuilder), | ||||
|     ) -> &mut Self { | ||||
|         { | ||||
|             let mut pipeline_descriptor_storage = self | ||||
|                 .resources | ||||
|                 .get_mut::<AssetStorage<PipelineDescriptor>>() | ||||
| @ -69,6 +70,7 @@ impl<'a> RenderGraphBuilder<'a> { | ||||
|                 .as_mut() | ||||
|                 .unwrap() | ||||
|                 .add_pipeline(pass, pipeline_descriptor_handle); | ||||
|         } | ||||
| 
 | ||||
|         self | ||||
|     } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Carter Anderson
						Carter Anderson