[core] Keep label in QuerySet descriptor

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev authored and Teodor Tanasoaia committed 2026-08-19 10:34:31 +02:00
1 parent 0196470c2c
commit dc109bce4c
2 files changed
+8 -8

No files matched your search

+1 -2
View File
@@ -5638,9 +5638,8 @@ impl Device {
raw: Snatchable::new(raw),
}),
device: self.clone(),
label: desc.label.to_string(),
tracking_data: TrackingData::new(self.tracker_indices.query_sets.clone()),
desc: desc.map_label(|_| ()),
desc: desc.map_label(|l| l.to_string()),
initialized_slots: Mutex::new(
rank::QUERY_SET_INITIALIZED_SLOTS,
bit_vec::BitVec::from_elem(desc.count as usize, false),
+7 -6
View File
@@ -3008,10 +3008,8 @@ pub(crate) struct QuerySetState {
pub struct QuerySet {
pub(crate) state: ResourceState<QuerySetState>,
pub(crate) device: Arc<Device>,
/// The `label` from the descriptor used to create the resource.
pub(crate) label: String,
pub(crate) tracking_data: TrackingData,
pub(crate) desc: wgt::QuerySetDescriptor<()>,
pub(crate) desc: wgt::QuerySetDescriptor<String>,
pub(crate) initialized_slots: Mutex<bit_vec::BitVec>,
}
@@ -3038,9 +3036,8 @@ impl QuerySet {
pub fn invalid(device: Arc<Device>, desc: &QuerySetDescriptor) -> Arc<Self> {
Arc::new(QuerySet {
state: ResourceState::Invalid,
label: desc.label.to_string(),
tracking_data: TrackingData::new(device.tracker_indices.query_sets.clone()),
desc: desc.clone().map_label(|_| ()),
desc: desc.map_label(|l| l.to_string()),
initialized_slots: Mutex::new(
rank::QUERY_SET_INITIALIZED_SLOTS,
bit_vec::BitVec::new(),
@@ -3123,7 +3120,11 @@ impl Drop for QuerySet {
}
crate::impl_resource_type!(QuerySet);
crate::impl_labeled!(QuerySet);
impl Labeled for QuerySet {
fn label(&self) -> &str {
&self.desc.label
}
}
crate::impl_parent_device!(QuerySet);
crate::impl_storage_item!(QuerySet);
crate::impl_trackable!(QuerySet);