diff --git a/CHANGELOG.md b/CHANGELOG.md index 78871071b2d..8765f030695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,7 @@ By @Vecvec in [#7913](https://github.com/gfx-rs/wgpu/pull/7913). - The function you pass to `Device::on_uncaptured_error()` must now implement `Sync` in addition to `Send`, and be wrapped in `Arc` instead of `Box`. In exchange for this, it is no longer possible for calling `wgpu` functions while in that callback to cause a deadlock (not that we encourage you to actually do that). By @kpreid in [#8011](https://github.com/gfx-rs/wgpu/pull/8011). +- Make a compacted hal acceleration structure inherit a label from the base BLAS. By @Vecvec in [#8103](https://github.com/gfx-rs/wgpu/pull/8103). #### Naga diff --git a/wgpu-core/src/device/queue.rs b/wgpu-core/src/device/queue.rs index d946ec35a0b..a58c076d83c 100644 --- a/wgpu-core/src/device/queue.rs +++ b/wgpu-core/src/device/queue.rs @@ -1465,6 +1465,8 @@ impl Queue { profiling::scope!("Queue::compact_blas"); api_log!("Queue::compact_blas"); + let new_label = blas.label.clone() + " (compacted)"; + self.device.check_is_valid()?; self.same_device_as(blas.as_ref())?; @@ -1486,7 +1488,7 @@ impl Queue { device .raw() .create_acceleration_structure(&hal::AccelerationStructureDescriptor { - label: None, + label: hal_label(Some(&new_label), device.instance_flags), size: size_info.acceleration_structure_size, format: hal::AccelerationStructureFormat::BottomLevel, allow_compaction: false, @@ -1528,7 +1530,7 @@ impl Queue { // Bypass the submit checks which update this because we don't submit this normally. built_index: RwLock::new(rank::BLAS_BUILT_INDEX, Some(built_index)), handle, - label: blas.label.clone() + " compacted", + label: new_label, tracking_data: TrackingData::new(blas.device.tracker_indices.blas_s.clone()), compaction_buffer: None, compacted_state: Mutex::new(rank::BLAS_COMPACTION_STATE, BlasCompactState::Compacted),