Commit cabbef6c998a
tarball1 file changed+7-0
@@ -53,7 +53,13 @@ impl FenceInner {
5353
}5454
}5555
56
+ /// Blocks until the GPU signals. A pending fence is first turned into its57
+ /// sync_file and polled, because waiting on the Vulkan fence itself sleeps58
+ /// in 10 ms steps on NVIDIA even when the work is done in microseconds.5659
pub fn wait(&self) -> Result<(), vk::Result> {60
+ if self.exportable {61
+ drop(self.export());62
+ }5763
match &*self.state.lock().unwrap_or_else(|e| e.into_inner()) {5864
State::Pending => unsafe {5965
self.shared@@ -69,6 +75,7 @@ impl FenceInner {
6975
}7076
}7177
78
+ #[profiling::function]7279
fn export(&self) -> Option<OwnedFd> {7380
if !self.exportable {7481
return None;