Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flip span labels to work better with tools #2820

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wgpu-core/src/command/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
encoder_id: id::CommandEncoderId,
base: BasePassRef<ComputeCommand>,
) -> Result<(), ComputePassError> {
profiling::scope!("run_compute_pass", "CommandEncoder");
profiling::scope!("CommandEncoder::run_compute_pass");
let init_scope = PassErrorScope::Pass(encoder_id);

let hub = A::hub(self);
Expand Down
8 changes: 4 additions & 4 deletions wgpu-core/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
encoder_id: id::CommandEncoderId,
_desc: &wgt::CommandBufferDescriptor<Label>,
) -> (id::CommandBufferId, Option<CommandEncoderError>) {
profiling::scope!("finish", "CommandEncoder");
profiling::scope!("CommandEncoder::finish");

let hub = A::hub(self);
let mut token = Token::root();
Expand Down Expand Up @@ -374,7 +374,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
encoder_id: id::CommandEncoderId,
label: &str,
) -> Result<(), CommandEncoderError> {
profiling::scope!("push_debug_group", "CommandEncoder");
profiling::scope!("CommandEncoder::push_debug_group");

let hub = A::hub(self);
let mut token = Token::root();
Expand All @@ -399,7 +399,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
encoder_id: id::CommandEncoderId,
label: &str,
) -> Result<(), CommandEncoderError> {
profiling::scope!("insert_debug_marker", "CommandEncoder");
profiling::scope!("CommandEncoder::insert_debug_marker");

let hub = A::hub(self);
let mut token = Token::root();
Expand All @@ -423,7 +423,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
&self,
encoder_id: id::CommandEncoderId,
) -> Result<(), CommandEncoderError> {
profiling::scope!("pop_debug_marker", "CommandEncoder");
profiling::scope!("CommandEncoder::pop_debug_marker");

let hub = A::hub(self);
let mut token = Token::root();
Expand Down
6 changes: 3 additions & 3 deletions wgpu-core/src/command/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {
buffer_guard: &'a Storage<Buffer<A>, id::BufferId>,
texture_guard: &'a Storage<Texture<A>, id::TextureId>,
) -> Result<Self, RenderPassErrorInner> {
profiling::scope!("start", "RenderPassInfo");
profiling::scope!("RenderPassInfo::start");

// We default to false intentionally, even if depth-stencil isn't used at all.
// This allows us to use the primary raw pipeline in `RenderPipeline`,
Expand Down Expand Up @@ -998,7 +998,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> {
raw: &mut A::CommandEncoder,
texture_guard: &Storage<Texture<A>, id::TextureId>,
) -> Result<(UsageScope<A>, SurfacesInDiscardState), RenderPassErrorInner> {
profiling::scope!("finish", "RenderPassInfo");
profiling::scope!("RenderPassInfo::finish");
unsafe {
raw.end_render_pass();
}
Expand Down Expand Up @@ -1091,7 +1091,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
color_attachments: &[Option<RenderPassColorAttachment>],
depth_stencil_attachment: Option<&RenderPassDepthStencilAttachment>,
) -> Result<(), RenderPassError> {
profiling::scope!("run_render_pass", "CommandEncoder");
profiling::scope!("CommandEncoder::run_render_pass");
let init_scope = PassErrorScope::Pass(encoder_id);

let hub = A::hub(self);
Expand Down
8 changes: 4 additions & 4 deletions wgpu-core/src/command/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
destination_offset: BufferAddress,
size: BufferAddress,
) -> Result<(), CopyError> {
profiling::scope!("copy_buffer_to_buffer", "CommandEncoder");
profiling::scope!("CommandEncoder::copy_buffer_to_buffer");

if source == destination {
return Err(TransferError::SameSourceDestinationBuffer.into());
Expand Down Expand Up @@ -617,7 +617,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
destination: &ImageCopyTexture,
copy_size: &Extent3d,
) -> Result<(), CopyError> {
profiling::scope!("copy_buffer_to_texture", "CommandEncoder");
profiling::scope!("CommandEncoder::copy_buffer_to_texture");

let hub = A::hub(self);
let mut token = Token::root();
Expand Down Expand Up @@ -744,7 +744,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
destination: &ImageCopyBuffer,
copy_size: &Extent3d,
) -> Result<(), CopyError> {
profiling::scope!("copy_texture_to_buffer", "CommandEncoder");
profiling::scope!("CommandEncoder::copy_texture_to_buffer");

let hub = A::hub(self);
let mut token = Token::root();
Expand Down Expand Up @@ -888,7 +888,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
destination: &ImageCopyTexture,
copy_size: &Extent3d,
) -> Result<(), CopyError> {
profiling::scope!("copy_texture_to_texture", "CommandEncoder");
profiling::scope!("CommandEncoder::copy_texture_to_texture");

let hub = A::hub(self);
let mut token = Token::root();
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/device/life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ impl<A: hal::Api> LifetimeTracker<A> {
}

pub fn cleanup(&mut self, device: &A::Device) {
profiling::scope!("cleanup", "LifetimeTracker");
profiling::scope!("LifetimeTracker::cleanup");
unsafe {
self.free_resources.clean(device);
}
Expand Down
Loading