Updated manager to have unique sequence added on default operations
This commit is contained in:
parent
1053cde1f0
commit
ba71c7ab46
3 changed files with 35 additions and 15 deletions
|
|
@ -75,10 +75,20 @@ Sequence::begin()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (this->isRunning()) {
|
||||
SPDLOG_WARN("Kompute Sequence begin called when sequence still running");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this->mCommandPool) {
|
||||
throw std::runtime_error("Kompute Sequence command pool is null");
|
||||
}
|
||||
|
||||
if (this->mOperations.size()) {
|
||||
SPDLOG_INFO("Kompute Sequence clearing previous operations");
|
||||
this->mOperations.clear();
|
||||
}
|
||||
|
||||
if (!this->mRecording) {
|
||||
SPDLOG_INFO("Kompute Sequence command recording BEGIN");
|
||||
this->mCommandBuffer->begin(vk::CommandBufferBeginInfo());
|
||||
|
|
@ -177,9 +187,10 @@ Sequence::evalAwait(uint64_t waitFor)
|
|||
this->mDevice->waitForFences(1, &this->mFence, VK_TRUE, waitFor);
|
||||
this->mDevice->destroy(this->mFence);
|
||||
|
||||
this->mIsRunning = false;
|
||||
|
||||
if (result == vk::Result::eTimeout) {
|
||||
SPDLOG_WARN("Kompute Sequence evalAwait timed out");
|
||||
this->mIsRunning = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -187,8 +198,6 @@ Sequence::evalAwait(uint64_t waitFor)
|
|||
this->mOperations[i]->postEval();
|
||||
}
|
||||
|
||||
this->mIsRunning = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue