diff --git a/wgpu-core/src/command/allocator.rs b/wgpu-core/src/command/allocator.rs index 5d0778fc6..6c7fd941a 100644 --- a/wgpu-core/src/command/allocator.rs +++ b/wgpu-core/src/command/allocator.rs @@ -243,6 +243,7 @@ impl CommandAllocator { } pub fn maintain(&self, device: &B::Device, last_done_index: SubmissionIndex) { + profiling::scope!("maintain", "CommandAllocator"); let mut inner = self.inner.lock(); let mut remove_threads = Vec::new(); for (&thread_id, pool) in inner.pools.iter_mut() { diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index bba9dc7a7..bada247a5 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -91,7 +91,6 @@ impl RenderBundleEncoder { parent_id: id::DeviceId, base: Option>, ) -> Result { - profiling::scope!("RenderBundleEncoder::new"); Ok(Self { base: base.unwrap_or_else(|| BasePass::new(&desc.label)), parent_id, @@ -511,7 +510,6 @@ impl RenderBundleEncoder { offset: wgt::BufferAddress, size: Option, ) { - profiling::scope!("RenderBundle::set_index_buffer"); self.base.commands.push(RenderCommand::SetIndexBuffer { buffer_id, index_format, diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 4971c6be5..a44f17a0b 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -257,7 +257,7 @@ impl Global { encoder_id: id::CommandEncoderId, base: BasePassRef, ) -> Result<(), ComputePassError> { - profiling::scope!("CommandEncoder::run_compute_pass"); + profiling::scope!("run_compute_pass", "CommandEncoder"); let scope = PassErrorScope::Pass(encoder_id); let hub = B::hub(self); diff --git a/wgpu-core/src/command/mod.rs b/wgpu-core/src/command/mod.rs index 5402970f3..006bd324a 100644 --- a/wgpu-core/src/command/mod.rs +++ b/wgpu-core/src/command/mod.rs @@ -78,6 +78,7 @@ impl CommandBuffer { ) { use hal::command::CommandBuffer as _; + profiling::scope!("insert_barriers"); debug_assert_eq!(B::VARIANT, base.backend()); debug_assert_eq!(B::VARIANT, head.backend()); @@ -198,7 +199,7 @@ impl Global { encoder_id: id::CommandEncoderId, _desc: &wgt::CommandBufferDescriptor