remove TrackingData from resources that are not tracked

This commit is contained in:
teoxoy 2024-08-07 12:28:01 +02:00 committed by Teodor Tanasoaia
parent 09cc4d211b
commit 781b54a8b9
4 changed files with 0 additions and 15 deletions

View File

@ -513,7 +513,6 @@ pub struct BindGroupLayout<A: HalApi> {
pub(crate) binding_count_validator: BindingTypeMaxCountValidator,
/// The `label` from the descriptor used to create the resource.
pub(crate) label: String,
pub(crate) tracking_data: TrackingData,
}
impl<A: HalApi> Drop for BindGroupLayout<A> {
@ -535,7 +534,6 @@ crate::impl_resource_type!(BindGroupLayout);
crate::impl_labeled!(BindGroupLayout);
crate::impl_parent_device!(BindGroupLayout);
crate::impl_storage_item!(BindGroupLayout);
crate::impl_trackable!(BindGroupLayout);
impl<A: HalApi> BindGroupLayout<A> {
pub(crate) fn raw(&self) -> &A::BindGroupLayout {
@ -657,7 +655,6 @@ pub struct PipelineLayout<A: HalApi> {
pub(crate) device: Arc<Device<A>>,
/// The `label` from the descriptor used to create the resource.
pub(crate) label: String,
pub(crate) tracking_data: TrackingData,
pub(crate) bind_group_layouts: ArrayVec<Arc<BindGroupLayout<A>>, { hal::MAX_BIND_GROUPS }>,
pub(crate) push_constant_ranges: ArrayVec<wgt::PushConstantRange, { SHADER_STAGE_COUNT }>,
}
@ -769,7 +766,6 @@ crate::impl_resource_type!(PipelineLayout);
crate::impl_labeled!(PipelineLayout);
crate::impl_parent_device!(PipelineLayout);
crate::impl_storage_item!(PipelineLayout);
crate::impl_trackable!(PipelineLayout);
#[repr(C)]
#[derive(Clone, Debug, Hash, Eq, PartialEq)]

View File

@ -1866,7 +1866,6 @@ impl<A: HalApi> Device<A> {
exclusive_pipeline: OnceCell::new(),
binding_count_validator: count_validator,
label: label.to_string(),
tracking_data: TrackingData::new(self.tracker_indices.bind_group_layouts.clone()),
})
}
@ -2577,7 +2576,6 @@ impl<A: HalApi> Device<A> {
raw: Some(raw),
device: self.clone(),
label: desc.label.to_string(),
tracking_data: TrackingData::new(self.tracker_indices.pipeline_layouts.clone()),
bind_group_layouts,
push_constant_ranges: desc.push_constant_ranges.iter().cloned().collect(),
})
@ -3428,7 +3426,6 @@ impl<A: HalApi> Device<A> {
let cache = pipeline::PipelineCache {
device: self.clone(),
label: desc.label.to_string(),
tracking_data: TrackingData::new(self.tracker_indices.pipeline_caches.clone()),
// This would be none in the error condition, which we don't implement yet
raw: Some(raw),
};

View File

@ -303,7 +303,6 @@ pub struct PipelineCache<A: HalApi> {
pub(crate) device: Arc<Device<A>>,
/// The `label` from the descriptor used to create the resource.
pub(crate) label: String,
pub(crate) tracking_data: TrackingData,
}
impl<A: HalApi> Drop for PipelineCache<A> {
@ -322,7 +321,6 @@ crate::impl_resource_type!(PipelineCache);
crate::impl_labeled!(PipelineCache);
crate::impl_parent_device!(PipelineCache);
crate::impl_storage_item!(PipelineCache);
crate::impl_trackable!(PipelineCache);
/// Describes how the vertex buffer is interpreted.
#[derive(Clone, Debug)]

View File

@ -221,13 +221,10 @@ pub(crate) struct TrackerIndexAllocators {
pub texture_views: Arc<SharedTrackerIndexAllocator>,
pub samplers: Arc<SharedTrackerIndexAllocator>,
pub bind_groups: Arc<SharedTrackerIndexAllocator>,
pub bind_group_layouts: Arc<SharedTrackerIndexAllocator>,
pub compute_pipelines: Arc<SharedTrackerIndexAllocator>,
pub render_pipelines: Arc<SharedTrackerIndexAllocator>,
pub pipeline_layouts: Arc<SharedTrackerIndexAllocator>,
pub bundles: Arc<SharedTrackerIndexAllocator>,
pub query_sets: Arc<SharedTrackerIndexAllocator>,
pub pipeline_caches: Arc<SharedTrackerIndexAllocator>,
}
impl TrackerIndexAllocators {
@ -238,13 +235,10 @@ impl TrackerIndexAllocators {
texture_views: Arc::new(SharedTrackerIndexAllocator::new()),
samplers: Arc::new(SharedTrackerIndexAllocator::new()),
bind_groups: Arc::new(SharedTrackerIndexAllocator::new()),
bind_group_layouts: Arc::new(SharedTrackerIndexAllocator::new()),
compute_pipelines: Arc::new(SharedTrackerIndexAllocator::new()),
render_pipelines: Arc::new(SharedTrackerIndexAllocator::new()),
pipeline_layouts: Arc::new(SharedTrackerIndexAllocator::new()),
bundles: Arc::new(SharedTrackerIndexAllocator::new()),
query_sets: Arc::new(SharedTrackerIndexAllocator::new()),
pipeline_caches: Arc::new(SharedTrackerIndexAllocator::new()),
}
}
}