mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-29 09:34:09 +01:00
Clear command buffer tracker
This commit is contained in:
1 parent
a6bc4420eb
commit
c0c2cdf31c
2 files changed
+12
-1
No files matched your search
@@ -99,7 +99,8 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
pool.available.pop().unwrap()
|
||||
}
|
||||
|
||||
pub fn after_submit(&self, cmd_buf: CommandBuffer<B>, submit_index: SubmissionIndex) {
|
||||
pub fn after_submit(&self, mut cmd_buf: CommandBuffer<B>, submit_index: SubmissionIndex) {
|
||||
cmd_buf.trackers.clear();
|
||||
cmd_buf
|
||||
.life_guard
|
||||
.submission_index
|
||||
|
||||
@@ -128,6 +128,12 @@ impl TrackerSet {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clear(&mut self) {
|
||||
self.buffers.clear();
|
||||
self.textures.clear();
|
||||
self.views.clear();
|
||||
}
|
||||
|
||||
pub fn consume_by_extend(&mut self, other: &Self) {
|
||||
self.buffers.consume_by_extend(&other.buffers).unwrap();
|
||||
self.textures.consume_by_extend(&other.textures).unwrap();
|
||||
@@ -280,6 +286,10 @@ impl<I: TypedId, U: Copy + GenericUsage + BitOr<Output = U> + PartialEq> Tracker
|
||||
}
|
||||
|
||||
impl<I: TypedId + Copy, U: Copy + GenericUsage + BitOr<Output = U> + PartialEq> Tracker<I, U> {
|
||||
fn clear(&mut self) {
|
||||
self.map.clear();
|
||||
}
|
||||
|
||||
fn _get_with_usage<'a, T: 'a + Borrow<RefCount>>(
|
||||
&mut self,
|
||||
storage: &'a Storage<T, I>,
|
||||
|
||||
Reference in new issue
Block a user