Skip to content

Commit 781b54a

Browse files
committed
remove TrackingData from resources that are not tracked
1 parent 09cc4d2 commit 781b54a

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

wgpu-core/src/binding_model.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ pub struct BindGroupLayout<A: HalApi> {
513513
pub(crate) binding_count_validator: BindingTypeMaxCountValidator,
514514
/// The `label` from the descriptor used to create the resource.
515515
pub(crate) label: String,
516-
pub(crate) tracking_data: TrackingData,
517516
}
518517

519518
impl<A: HalApi> Drop for BindGroupLayout<A> {
@@ -535,7 +534,6 @@ crate::impl_resource_type!(BindGroupLayout);
535534
crate::impl_labeled!(BindGroupLayout);
536535
crate::impl_parent_device!(BindGroupLayout);
537536
crate::impl_storage_item!(BindGroupLayout);
538-
crate::impl_trackable!(BindGroupLayout);
539537

540538
impl<A: HalApi> BindGroupLayout<A> {
541539
pub(crate) fn raw(&self) -> &A::BindGroupLayout {
@@ -657,7 +655,6 @@ pub struct PipelineLayout<A: HalApi> {
657655
pub(crate) device: Arc<Device<A>>,
658656
/// The `label` from the descriptor used to create the resource.
659657
pub(crate) label: String,
660-
pub(crate) tracking_data: TrackingData,
661658
pub(crate) bind_group_layouts: ArrayVec<Arc<BindGroupLayout<A>>, { hal::MAX_BIND_GROUPS }>,
662659
pub(crate) push_constant_ranges: ArrayVec<wgt::PushConstantRange, { SHADER_STAGE_COUNT }>,
663660
}
@@ -769,7 +766,6 @@ crate::impl_resource_type!(PipelineLayout);
769766
crate::impl_labeled!(PipelineLayout);
770767
crate::impl_parent_device!(PipelineLayout);
771768
crate::impl_storage_item!(PipelineLayout);
772-
crate::impl_trackable!(PipelineLayout);
773769

774770
#[repr(C)]
775771
#[derive(Clone, Debug, Hash, Eq, PartialEq)]

wgpu-core/src/device/resource.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,6 @@ impl<A: HalApi> Device<A> {
18661866
exclusive_pipeline: OnceCell::new(),
18671867
binding_count_validator: count_validator,
18681868
label: label.to_string(),
1869-
tracking_data: TrackingData::new(self.tracker_indices.bind_group_layouts.clone()),
18701869
})
18711870
}
18721871

@@ -2577,7 +2576,6 @@ impl<A: HalApi> Device<A> {
25772576
raw: Some(raw),
25782577
device: self.clone(),
25792578
label: desc.label.to_string(),
2580-
tracking_data: TrackingData::new(self.tracker_indices.pipeline_layouts.clone()),
25812579
bind_group_layouts,
25822580
push_constant_ranges: desc.push_constant_ranges.iter().cloned().collect(),
25832581
})
@@ -3428,7 +3426,6 @@ impl<A: HalApi> Device<A> {
34283426
let cache = pipeline::PipelineCache {
34293427
device: self.clone(),
34303428
label: desc.label.to_string(),
3431-
tracking_data: TrackingData::new(self.tracker_indices.pipeline_caches.clone()),
34323429
// This would be none in the error condition, which we don't implement yet
34333430
raw: Some(raw),
34343431
};

wgpu-core/src/pipeline.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ pub struct PipelineCache<A: HalApi> {
303303
pub(crate) device: Arc<Device<A>>,
304304
/// The `label` from the descriptor used to create the resource.
305305
pub(crate) label: String,
306-
pub(crate) tracking_data: TrackingData,
307306
}
308307

309308
impl<A: HalApi> Drop for PipelineCache<A> {
@@ -322,7 +321,6 @@ crate::impl_resource_type!(PipelineCache);
322321
crate::impl_labeled!(PipelineCache);
323322
crate::impl_parent_device!(PipelineCache);
324323
crate::impl_storage_item!(PipelineCache);
325-
crate::impl_trackable!(PipelineCache);
326324

327325
/// Describes how the vertex buffer is interpreted.
328326
#[derive(Clone, Debug)]

wgpu-core/src/track/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,10 @@ pub(crate) struct TrackerIndexAllocators {
221221
pub texture_views: Arc<SharedTrackerIndexAllocator>,
222222
pub samplers: Arc<SharedTrackerIndexAllocator>,
223223
pub bind_groups: Arc<SharedTrackerIndexAllocator>,
224-
pub bind_group_layouts: Arc<SharedTrackerIndexAllocator>,
225224
pub compute_pipelines: Arc<SharedTrackerIndexAllocator>,
226225
pub render_pipelines: Arc<SharedTrackerIndexAllocator>,
227-
pub pipeline_layouts: Arc<SharedTrackerIndexAllocator>,
228226
pub bundles: Arc<SharedTrackerIndexAllocator>,
229227
pub query_sets: Arc<SharedTrackerIndexAllocator>,
230-
pub pipeline_caches: Arc<SharedTrackerIndexAllocator>,
231228
}
232229

233230
impl TrackerIndexAllocators {
@@ -238,13 +235,10 @@ impl TrackerIndexAllocators {
238235
texture_views: Arc::new(SharedTrackerIndexAllocator::new()),
239236
samplers: Arc::new(SharedTrackerIndexAllocator::new()),
240237
bind_groups: Arc::new(SharedTrackerIndexAllocator::new()),
241-
bind_group_layouts: Arc::new(SharedTrackerIndexAllocator::new()),
242238
compute_pipelines: Arc::new(SharedTrackerIndexAllocator::new()),
243239
render_pipelines: Arc::new(SharedTrackerIndexAllocator::new()),
244-
pipeline_layouts: Arc::new(SharedTrackerIndexAllocator::new()),
245240
bundles: Arc::new(SharedTrackerIndexAllocator::new()),
246241
query_sets: Arc::new(SharedTrackerIndexAllocator::new()),
247-
pipeline_caches: Arc::new(SharedTrackerIndexAllocator::new()),
248242
}
249243
}
250244
}

0 commit comments

Comments
 (0)