diff --git a/src/Sequence.cpp b/src/Sequence.cpp index d8063e37..b61f4da3 100644 --- a/src/Sequence.cpp +++ b/src/Sequence.cpp @@ -133,7 +133,12 @@ Sequence::evalAsync() this->mDevice->resetFences({ this->mFence }); - this->mComputeQueue->submit(1, &submitInfo, this->mFence); + try { + this->mComputeQueue->submit(1, &submitInfo, this->mFence); + } catch (...) { + this->mIsRunning = false; + throw; + } return shared_from_this(); } @@ -155,8 +160,14 @@ Sequence::evalAwait(uint64_t waitFor) return shared_from_this(); } - vk::Result result = - this->mDevice->waitForFences(1, &this->mFence, VK_TRUE, waitFor); + vk::Result result; + try { + result = + this->mDevice->waitForFences(1, &this->mFence, VK_TRUE, waitFor); + } catch (...) { + this->mIsRunning = false; + throw; + } this->mIsRunning = false;