mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
don't optimize BindGroupStates.{views,samplers}
The resources inside `StatelessBindGroupState` are never merged with any other tracker.
This commit is contained in:
parent
3a5ad193db
commit
a3142ade91
@ -444,8 +444,6 @@ impl<A: HalApi> BindGroupStates<A> {
|
||||
pub fn optimize(&mut self) {
|
||||
self.buffers.optimize();
|
||||
self.textures.optimize();
|
||||
self.views.optimize();
|
||||
self.samplers.optimize();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,15 +20,6 @@ impl<T: Trackable> StatelessBindGroupState<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Optimize the buffer bind group state by sorting it by ID.
|
||||
///
|
||||
/// When this list of states is merged into a tracker, the memory
|
||||
/// accesses will be in a constant ascending order.
|
||||
pub(crate) fn optimize(&mut self) {
|
||||
self.resources
|
||||
.sort_unstable_by_key(|resource| resource.tracker_index());
|
||||
}
|
||||
|
||||
/// Adds the given resource.
|
||||
pub fn add_single(&mut self, resource: &Arc<T>) {
|
||||
self.resources.push(resource.clone());
|
||||
|
Loading…
Reference in New Issue
Block a user