Skip to content

Make the compacted hal acceleration structure inherit a label from the base BLAS. #8103

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions wgpu-core/src/device/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;

Expand All @@ -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,
Expand Down Expand Up @@ -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),
Expand Down
Loading