mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 01:11:22 +01:00
get_with_usage helper
This commit is contained in:
1 parent
08cd75f38c
commit
bb7fee796d
5 files changed
+41
-13
No files matched your search
@@ -103,7 +103,7 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
pool.available.pop().unwrap()
|
||||
}
|
||||
|
||||
pub fn submit(&self, cmd_buf: CommandBuffer<B>) {
|
||||
pub fn after_submit(&self, cmd_buf: CommandBuffer<B>) {
|
||||
self.inner.lock().pending.push(cmd_buf);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
self.inner.lock().recycle(cmd_buf);
|
||||
}
|
||||
|
||||
pub fn maintain(&self, device: &B::Device, last_done: SubmissionIndex) {
|
||||
pub fn maintain(&self, last_done: SubmissionIndex) {
|
||||
let mut inner = self.inner.lock();
|
||||
for i in (0..inner.pending.len()).rev() {
|
||||
let index = inner.pending[i].life_guard.submission_index.load(Ordering::Acquire);
|
||||
|
||||
Reference in new issue
Block a user