Fix and improve tracy rendering spans (#18588)
* `submit_graph_commands` was incorrectly timing the command buffer generation tasks as well, and not only the queue submission. Moved the span to fix that. * Added a new `command_buffer_generation_tasks` span as a parent for all the individual command buffer generation tasks that don't run as part of the Core3d span. 
This commit is contained in:
parent
f4a5e8bc51
commit
b3c83465b3
@ -87,10 +87,10 @@ impl RenderGraphRunner {
|
||||
finalizer(render_context.command_encoder());
|
||||
|
||||
let (render_device, mut diagnostics_recorder) = {
|
||||
let (commands, render_device, diagnostics_recorder) = render_context.finish();
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
let _span = info_span!("submit_graph_commands").entered();
|
||||
|
||||
let (commands, render_device, diagnostics_recorder) = render_context.finish();
|
||||
queue.submit(commands);
|
||||
|
||||
(render_device, diagnostics_recorder)
|
||||
|
@ -498,6 +498,10 @@ impl<'w> RenderContext<'w> {
|
||||
|
||||
let mut command_buffers = Vec::with_capacity(self.command_buffer_queue.len());
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
let _command_buffer_generation_tasks_span =
|
||||
info_span!("command_buffer_generation_tasks").entered();
|
||||
|
||||
#[cfg(not(all(target_arch = "wasm32", target_feature = "atomics")))]
|
||||
{
|
||||
let mut task_based_command_buffers = ComputeTaskPool::get().scope(|task_pool| {
|
||||
@ -537,6 +541,9 @@ impl<'w> RenderContext<'w> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
drop(_command_buffer_generation_tasks_span);
|
||||
|
||||
command_buffers.sort_unstable_by_key(|(i, _)| *i);
|
||||
|
||||
let mut command_buffers = command_buffers
|
||||
|
Loading…
Reference in New Issue
Block a user