Ensure wait_for_fences is never called on 0 fences

This commit is contained in:
Rukai 2019-06-03 22:40:04 +10:00
parent a1a1467d15
commit 4ad3d418c2

View File

@ -177,7 +177,7 @@ impl<B: hal::Backend> PendingResources<B> {
heaps_mutex: &Mutex<Heaps<B>>,
force_wait: bool,
) -> SubmissionIndex {
if force_wait {
if force_wait && !self.active.is_empty() {
let status = unsafe {
device.wait_for_fences(
self.active.iter().map(|a| &a.fence),