measure rendergraph time
This commit is contained in:
parent
30269f7bd2
commit
5a1ed9340e
|
@ -311,6 +311,7 @@ impl RenderGraph {
|
||||||
Last,
|
Last,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let now = std::time::Instant::now();
|
||||||
let mut dag = petgraph::stable_graph::StableDiGraph::new();
|
let mut dag = petgraph::stable_graph::StableDiGraph::new();
|
||||||
|
|
||||||
let root = dag.add_node(PassNode::First);
|
let root = dag.add_node(PassNode::First);
|
||||||
|
@ -534,6 +535,12 @@ impl RenderGraph {
|
||||||
panic!("dag is cyclic!");
|
panic!("dag is cyclic!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::debug!(
|
||||||
|
"resolving render graph: {}ms",
|
||||||
|
now.elapsed().as_micros() as f32 / 1e3
|
||||||
|
);
|
||||||
|
|
||||||
|
let now = std::time::Instant::now();
|
||||||
let pool =
|
let pool =
|
||||||
commands::SingleUseCommandPool::new(device.clone(), device.graphics_queue().clone())?;
|
commands::SingleUseCommandPool::new(device.clone(), device.graphics_queue().clone())?;
|
||||||
|
|
||||||
|
@ -585,15 +592,12 @@ impl RenderGraph {
|
||||||
.collect::<crate::Result<Vec<_>>>()?;
|
.collect::<crate::Result<Vec<_>>>()?;
|
||||||
|
|
||||||
let cmd_list = commands::CommandList(cmds);
|
let cmd_list = commands::CommandList(cmds);
|
||||||
// let future = cmd_list.submit(None, None, Arc::new(sync::Fence::create(device.clone())?))?;
|
|
||||||
|
|
||||||
// future.block()?;
|
tracing::debug!(
|
||||||
|
"recording render graph: {}ms",
|
||||||
|
now.elapsed().as_micros() as f32 / 1e3
|
||||||
|
);
|
||||||
|
|
||||||
// let outputs = self
|
|
||||||
// .outputs
|
|
||||||
// .iter()
|
|
||||||
// .filter_map(|id| self.resources.remove(id).map(|res| (*id, res)))
|
|
||||||
// .collect::<BTreeMap<_, _>>();
|
|
||||||
Ok(WithLifetime::new(cmd_list))
|
Ok(WithLifetime::new(cmd_list))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue