diff --git a/wgpu-core/src/command/clear.rs b/wgpu-core/src/command/clear.rs index 6a4ec982260..17130f7aab3 100644 --- a/wgpu-core/src/command/clear.rs +++ b/wgpu-core/src/command/clear.rs @@ -450,7 +450,7 @@ fn clear_texture_via_render_passes( }; unsafe { encoder.begin_render_pass(&hal::RenderPassDescriptor { - label: Some("clear_texture clear pass"), + label: Some("(wgpu) clear_texture clear pass"), extent, sample_count, color_attachments, diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 3046a7a23b6..07e20cd2166 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -982,7 +982,7 @@ impl<'a, A: HalApi> RenderPassInfo<'a, A> { ) }; let desc = hal::RenderPassDescriptor { - label: Some("Zero init discarded depth/stencil aspect"), + label: Some("(wgpu) Zero init discarded depth/stencil aspect"), extent: view.extent, sample_count: view.samples, color_attachments: &[], diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 62fa2386c42..25a3467f7cd 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -356,7 +356,7 @@ impl Device { let zero_buffer = unsafe { open.device .create_buffer(&hal::BufferDescriptor { - label: Some("wgpu zero init buffer"), + label: Some("(wgpu) zero init buffer"), size: ZERO_BUFFER_SIZE, usage: hal::BufferUses::COPY_SRC | hal::BufferUses::COPY_DST, memory_flags: hal::MemoryFlags::empty(), @@ -784,7 +784,7 @@ impl Device { for mip_level in 0..desc.mip_level_count { for array_layer in 0..desc.size.depth_or_array_layers { let desc = hal::TextureViewDescriptor { - label: Some("clear texture view"), + label: Some("(wgpu) clear texture view"), format: desc.format, dimension, usage, @@ -3107,7 +3107,7 @@ impl Global { } else { // buffer needs staging area for initialization only let stage_desc = wgt::BufferDescriptor { - label: Some(Cow::Borrowed("")), + label: Some(Cow::Borrowed("(wgpu) initializing unmappable buffer")), size: desc.size, usage: wgt::BufferUsages::MAP_WRITE | wgt::BufferUsages::COPY_SRC, mapped_at_creation: false, diff --git a/wgpu-core/src/device/queue.rs b/wgpu-core/src/device/queue.rs index b242e5b6834..6235f0df68e 100644 --- a/wgpu-core/src/device/queue.rs +++ b/wgpu-core/src/device/queue.rs @@ -174,7 +174,7 @@ impl PendingWrites { if !self.is_active { unsafe { self.command_encoder - .begin_encoding(Some("_PendingWrites")) + .begin_encoding(Some("(wgpu) PendingWrites")) .unwrap(); } self.is_active = true; @@ -196,7 +196,7 @@ impl super::Device { fn prepare_stage(&mut self, size: wgt::BufferAddress) -> Result, DeviceError> { profiling::scope!("prepare_stage"); let stage_desc = hal::BufferDescriptor { - label: Some("_Staging"), + label: Some("(wgpu) Staging"), size, usage: hal::BufferUses::MAP_WRITE | hal::BufferUses::COPY_SRC, memory_flags: hal::MemoryFlags::TRANSIENT, @@ -754,7 +754,7 @@ impl Global { unsafe { baked .encoder - .begin_encoding(Some("_Transit")) + .begin_encoding(Some("(wgpu) Transit")) .map_err(DeviceError::from)? }; log::trace!("Stitching command buffer {:?} before submission", cmb_id); @@ -785,7 +785,7 @@ impl Global { unsafe { baked .encoder - .begin_encoding(Some("_Present")) + .begin_encoding(Some("(wgpu) Present")) .map_err(DeviceError::from)? }; let texture_barriers = trackers diff --git a/wgpu-core/src/present.rs b/wgpu-core/src/present.rs index 17bdf467a99..1cea2f2fef3 100644 --- a/wgpu-core/src/present.rs +++ b/wgpu-core/src/present.rs @@ -126,7 +126,7 @@ impl Global { let (texture_id, status) = match unsafe { suf.raw.acquire_texture(FRAME_TIMEOUT_MS) } { Ok(Some(ast)) => { let clear_view_desc = hal::TextureViewDescriptor { - label: Some("clear surface texture view"), + label: Some("(wgpu) clear surface texture view"), format: config.format, dimension: wgt::TextureViewDimension::D2, usage: hal::TextureUses::COLOR_TARGET, diff --git a/wgpu-hal/src/gles/device.rs b/wgpu-hal/src/gles/device.rs index 29a6155f149..38534d4500a 100644 --- a/wgpu-hal/src/gles/device.rs +++ b/wgpu-hal/src/gles/device.rs @@ -213,8 +213,12 @@ impl super::Device { }; let shader_src = format!("#version {} es \n void main(void) {{}}", version,); log::info!("Only vertex shader is present. Creating an empty fragment shader",); - let shader = - Self::compile_shader(gl, &shader_src, naga::ShaderStage::Fragment, Some("_dummy"))?; + let shader = Self::compile_shader( + gl, + &shader_src, + naga::ShaderStage::Fragment, + Some("(wgpu) dummy fragment shader"), + )?; shaders_to_delete.push(shader); } diff --git a/wgpu-hal/src/metal/mod.rs b/wgpu-hal/src/metal/mod.rs index 84c1e20929b..5ab789d7150 100644 --- a/wgpu-hal/src/metal/mod.rs +++ b/wgpu-hal/src/metal/mod.rs @@ -338,7 +338,7 @@ impl crate::Queue for Queue { .to_owned() } }; - raw.set_label("_Signal"); + raw.set_label("(wgpu) Signal"); raw.add_completed_handler(&block); fence.maintain(); @@ -370,7 +370,7 @@ impl crate::Queue for Queue { let queue = &self.raw.lock(); objc::rc::autoreleasepool(|| { let command_buffer = queue.new_command_buffer(); - command_buffer.set_label("_Present"); + command_buffer.set_label("(wgpu) Present"); // https://developer.apple.com/documentation/quartzcore/cametallayer/1478157-presentswithtransaction?language=objc if !texture.present_with_transaction { diff --git a/wgpu/src/util/belt.rs b/wgpu/src/util/belt.rs index d735d184749..33101d82814 100644 --- a/wgpu/src/util/belt.rs +++ b/wgpu/src/util/belt.rs @@ -115,7 +115,7 @@ impl StagingBelt { let size = self.chunk_size.max(size.get()); Chunk { buffer: device.create_buffer(&BufferDescriptor { - label: Some("staging"), + label: Some("(wgpu) StagingBelt staging buffer"), size, usage: BufferUsages::MAP_WRITE | BufferUsages::COPY_SRC, mapped_at_creation: true,