From 4ad3d418c2ff95994fce50adb78aee96fb2c7deb Mon Sep 17 00:00:00 2001 From: Rukai Date: Mon, 3 Jun 2019 22:40:04 +1000 Subject: [PATCH] Ensure wait_for_fences is never called on 0 fences --- wgpu-native/src/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-native/src/device.rs b/wgpu-native/src/device.rs index 9abded8be..395b695ec 100644 --- a/wgpu-native/src/device.rs +++ b/wgpu-native/src/device.rs @@ -177,7 +177,7 @@ impl PendingResources { heaps_mutex: &Mutex>, 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),