mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-26 08:45:59 +00:00
Fix FenceSignalFuture::cleanup_finished
This commit is contained in:
parent
4de0f2e114
commit
f1dac0b9c8
@ -99,12 +99,25 @@ impl<F> FenceSignalFuture<F> where F: GpuFuture {
|
||||
let mut state = self.state.lock().unwrap();
|
||||
|
||||
match *state {
|
||||
FenceSignalFutureState::Flushed(_, ref fence) => {
|
||||
FenceSignalFutureState::Flushed(ref mut prev, ref fence) => {
|
||||
match fence.wait(Some(Duration::from_secs(0))) {
|
||||
Ok(()) => (),
|
||||
Err(_) => return,
|
||||
Ok(()) => unsafe {
|
||||
prev.signal_finished()
|
||||
},
|
||||
Err(_) => {
|
||||
prev.cleanup_finished();
|
||||
return
|
||||
},
|
||||
}
|
||||
},
|
||||
FenceSignalFutureState::Pending(ref mut prev, _) => {
|
||||
prev.cleanup_finished();
|
||||
return;
|
||||
},
|
||||
FenceSignalFutureState::PartiallyFlushed(ref mut prev, _) => {
|
||||
prev.cleanup_finished();
|
||||
return;
|
||||
},
|
||||
_ => return,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user