get_with_usage helper

This commit is contained in:
Dzmitry Malyshau committed 2019-01-21 16:18:56 -05:00
1 parent 08cd75f38c
commit bb7fee796d
5 files changed
+41 -13

No files matched your search

+2 -2
View File
@@ -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);